ok, Ive been trying to get to the root of this also, and at the heart of your question is how NAT works. NAT on Linux is also called masquerading. So do some research on that.
Ok, so what your linux box is going to do is have two network interfaces: one to the lan, and one to the cable modem. Since you are probably running a small network, your subnet mask is gonna be 255.255.255.0, and your subnet on your lan will be 192.68.0. (or mebbe its 168??? I forget-- see the rfc on private internet address allocation)You can either set up the lan machines with static IP addresses (which on a small lan isnt all that rough) or have them look to dhcp, which will have to be running on your linux box. On your linux box, youll have to set up dhcp to dole out the range of addresses 192.68.0.2 - 192.68.254. This will give you 254 addresses to play with-- more than youll ever need. On your second linux interface to the cable modem (aka ISP network). Enable IP routing, and enable that interface to get its IP address by dhcp (or use a static IP address if you have one, or any other method you use to get an ip from your ISP). Oh, the LAN interface should have a static IP of I believe 192.68.0.1 That IP will also be your default gateway. Now there is also something else that needs to run to allow your linux box to remember where everything that is going out is coming from. Im not sure if just enabling IP routing on the outbound interface will take care of everything. Either way, this should give you a good enough start. Now I havent done this on Linux, I just know how NAT works and have done it on NT/2000. So there may be some misinformat or other problems that hopefully someone will correct me on.
-Kevin
I pledge allegiance, to the flag, of the Corporate Republic of America...