masquerade with iptables

Allows for easy sharing of internet connection to an internal network with dynamic IP range.

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

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

SNAT for static WAN IP

# iptables -t nat -A POSTROUTING -j SNAT --to-source {static WAN IP}