Hey,
If this thread is already opened so I will add my experience and questions:
I was successful in getting my internet connection sharing wrok, though It only works if the pc which is not the gateway runs linux. This is how I did it:
on the gateay I have two NICs eth0 and eth1. eth0 is for the local netwrok. I connecto to the internet with a cable modem through eth0.
first I thought I had to assign ip to every pc on the netwrok:
on the gateway:
ifconfig eth0 broadcast 192.168.0.1 netmask 255.255.255.0
on the other pc:
ifconfig eth0 broadcast 192.168.0.2 netmask 255.255.255.0
next is to configure the iptables:
on the gateway:
iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
echo "1" > /proc/sys/net/ipv4/ip_forward
and to assign a gateway to the other pc:
route add default 192.168.0.1 metric 1
and everything somehow works.
if you are doing the same on windows make sure, the ip assigned to eth0 remains as it is when you run ifconfig.... (and everything is still correct on the linux gateway).
Last edited by alexrait1; 08-27-2004 at 04:33 AM.
|