This is the demo site of MinoriWiki
And a partial mirror of FelixWiki.
sed -i 's/.*net\.ipv4\.ip_forward.*/net.ipv4.ip_forward = 1/' /etc/sysctl.conf
sysctl -p
iptables -t nat -A POSTROUTING -s 10.0.0.0/8 -j SNAT --to-source <IP>
iptables -t nat -A POSTROUTING -s 10.0.0.0/8 -j MASQUERADE
Or if you want to MASQUERADE all interfaces:
iptables -t nat -A POSTROUTING ! -o lo -j MASQUERADE
Last Update: Sat Oct 15 2016 09:31:15 GMT+0900 (JST) Source File