PDA

View Full Version : help for internet connection sharing???



captaincourage
11-28-2003, 04:36 AM
i need help about ip masquerading...

SERVER: knoppix box (hdd installation)
eth0 (usb) motorola cable modem
eth1 (pci) intel ethernet

HUB: 8 port n-way switch hub

CLIENT(S): win xp box with pci ethernet


ok, that's the what i wanna build...

....SERVER: knoppix box (hd installation)
........................... l
............................l
...........................V
..............HUB: uplink / port 1 / port 2 / port 3...
.......................................l.......... ..l
.......................................l.......... ..l
......................................V........... V
....CLIENTS:.............xp box....xp box

ok, what now? :?:

thanx 4 replies...

swazi
11-29-2003, 06:01 AM
Something like this in your iptables should do the trick.

echo '1' > /proc/sys/net/ipv4/ip_forward
iptables -P INPUT ACCEPT
iptables -P OUTPUT ACCEPT
iptables -P FORWARD DROP
iptables -A FORWARD -i eth0 -o eth1 -m state --state ESTABLISHED,RELATED -j ACCE
PT
iptables -A FORWARD -j ACCEPT
iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE

I added this to my /etc/default/iptables file, not too sure if it's the correct method but it worked.