Skip to main content.

2005-May-13

IP masquerading:
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
(where eth0 is the external interface.) Be sure to also set /proc/sys/net/ipv4/ip_forward to 1 for forwarding. And /proc/sys/net/ipv4/ip_dynaddr to 1 if you want to use dynamic changing address work for rules.