here you are, man.
echo 1 >/proc/sys/net/ipv4/ip_forward # Enable IP forwarding
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
iptables -A FORWARD -i eth1 -j ACCEPT
where is eth0 - your network card, that has real ip on internet. eth1 - your network card which is connected to your lan. don't forget to put this as a startup script and to tell other machines the ip of your gateway.
|