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
1 changed files with 2 additions and 1 deletions

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