summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xscripts/poky-qemu-ifup9
1 files changed, 7 insertions, 2 deletions
diff --git a/scripts/poky-qemu-ifup b/scripts/poky-qemu-ifup
index d68e64c281..cb1891e271 100755
--- a/scripts/poky-qemu-ifup
+++ b/scripts/poky-qemu-ifup
@@ -27,6 +27,11 @@ fi
27$IFCONFIG tap0 192.168.7.1 27$IFCONFIG tap0 192.168.7.1
28 28
29# setup NAT for tap0 interface to have internet access in QEMU 29# setup NAT for tap0 interface to have internet access in QEMU
30iptables -A POSTROUTING -t nat -j MASQUERADE -s 192.168.7.0/24 30IPTABLES=`which iptables`
31if [ "x$IPTABLES" = "x" ]; then
32 IPTABLES=/sbin/iptables
33fi
34
35$IPTABLES -A POSTROUTING -t nat -j MASQUERADE -s 192.168.7.0/24
31echo 1 > /proc/sys/net/ipv4/ip_forward 36echo 1 > /proc/sys/net/ipv4/ip_forward
32iptables -P FORWARD ACCEPT 37$IPTABLES -P FORWARD ACCEPT