Re: Sharing a Cable Modem
On Fri, 2001-09-07 at 18:08, Bastien Nocera wrote:
> > The box will have to do IP Masquerade, this is
> > ipchains right? I think I can do ipchains.
> I have that as a script on my iMac to offer masquerading to my laptop.
> # install ipchains modulemodprobe ipchains
> # enable IP forwarding
> /sbin/sysctl -w net/ipv4/ip_forward=1 > /dev/null
> # Deny all forwarding
> ipchains -P forward DENY
> # Forward (masquerade) to eth0 (internet) what comes from 192.168.1.2
> ipchains -A forward -i eth0 -s 192.168.1.2/32 -j MASQ
This works, or you can simply "apt-get install ipmasq" on the
First setup the networking so that the masq. machine can see outside
world (the dsl/cable modem) and also the internal network (192.168.1.X
for example, the hub), and if your masq. box has the internal network ip
192.168.1.1 for example, set that as the GATEWAY on the other machines.
Then apt-get install ipmasq and it should start working. Of course one
can do it by hand also, but the ipmasq package's scripts seen to have
the nice effect of also working with dynamic ip addresses etc. In fact,
as I am currently without a broadband connection (aaaargh! :) my
ipmasquerading stuff works fine with a 33.6bps modem dialup on the same
machine, I just start ppp instead of configuring eth0, and things work
Of course you very likely want to tune the firewall for security if you
are on a broadband connection, but that is another topic. I have a
separate script for that purpose I run after the ipmasq thingy.
* Yes, I dont claim to be a networking expert, but it works for me, and
maybe this was useful information for someone else :o)
:: :: Tuomas Kuosmanen :: Art Director, Ximian :: ::
:: :: email@example.com :: www.ximian.com :: ::