Enable NAT on both tap0 and tun0, and set the outgoing interface to eth10 which seems to be the default on instant-contiki

This commit is contained in:
adamdunkels 2009-05-12 17:24:04 +00:00
parent 00890caca8
commit 8bfb856220

View file

@ -2,8 +2,9 @@
# Run this script as root ("sudo ./setup-nat-ubuntu"). It has been tested on Ubunru 8.04.
/sbin/iptables --table nat --append POSTROUTING --out-interface eth0 -j MASQUERADE
/sbin/iptables --table nat --append POSTROUTING --out-interface eth10 -j MASQUERADE
/sbin/iptables --append FORWARD --in-interface tun0 -j ACCEPT
/sbin/iptables --append FORWARD --in-interface tap0 -j ACCEPT
/sbin/sysctl -w net.ipv4.conf.default.forwarding=1
/sbin/sysctl -w net.ipv4.conf.all.forwarding=1