Skip to content

Commit

Permalink
Enable NAT on both tap0 and tun0, and set the outgoing interface to e…
Browse files Browse the repository at this point in the history
…th10 which seems to be the default on instant-contiki
  • Loading branch information
adamdunkels committed May 12, 2009
1 parent 00890ca commit 8bfb856
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tools/setup-nat-ubuntu
Expand Up @@ -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
Expand Down

0 comments on commit 8bfb856

Please sign in to comment.