Internet Connection Sharing is probably really what you seek. I've never done it.
https://help.ubuntu.com/community/Internet/ConnectionSharing

Since home routers do this stuff well, there is...