Difference between revisions of "Network sharing"
From MyWiki
(Created page with " '''Configure iptables for NAT translation so that packets can be correctly routed through the Ubuntu gateway. ''' sudo iptables -A FORWARD -o eth0 -i eth1 -s 192.168.0.0/24...") |
(No difference)
|
Revision as of 12:05, 24 July 2014
Configure iptables for NAT translation so that packets can be correctly routed through the Ubuntu gateway.
sudo iptables -A FORWARD -o eth0 -i eth1 -s 192.168.0.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