mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-11-10 06:06:00 +00:00
16 lines
489 B
Bash
Executable File
16 lines
489 B
Bash
Executable File
#!/bin/sh
|
|
|
|
# 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 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
|
|
|
|
/sbin/sysctl -w net.ipv4.ip_forward=1
|
|
|
|
echo 1 > /proc/sys/net/ipv4/ip_forward
|
|
|