This is a simple masquerading rule, to allow computers behind a Unix machine to access Internet.

echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -F
iptables -t nat -A POSTROUTING -s -j MASQUERADE

These three lines stand for:
– allow “IP” forwarding
– flush the “-t nat” table to ensure that there are no other rules that apply to your policy
– masquerade the traffic generated by the network

You can add these three lines at the bottom of your “/etc/rc.local” file to ensure that after a reboot your machine will continue to masquerade.