Network sharing
From MyWiki
Configure iptables for NAT translation so that packets can be correctly routed through the Ubuntu gateway https://help.ubuntu.com/community/Internet/ConnectionSharing sudo iptables -A FORWARD -o eth0 -i eth1 -s 192.168.32.0/24 -m conntrack --ctstate NEW -j ACCEPT sudo iptables -A FORWARD -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT sudo iptables -t nat -F POSTROUTING sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE