Quick iptables gateway setup

eth0 - with internet connection as they say
eth2 - local network


echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
iptables -A FORWARD -i eth2 -j ACCEPT

By penoi on Monday, June 11, 2012 | | A comment?
0 responses to “Quick iptables gateway setup”