Activate Masquerading (NAT) on Linux router

To activate NAT on a Linux Box used as a router, just use the following line :

iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

eth0 is the network interface able to access Internet directly

Then you can list the NAT entry in iptables with the following command

# iptables -t nat -L

You can get more details with:

# iptables -t nat -L -v

The conntrack tool also help to see what happen in the NAT

# conntrack -L --src-nat / --dst-nat