summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/poky-qemu-ifup5
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/poky-qemu-ifup b/scripts/poky-qemu-ifup
index 5cf48d7b8c..d68e64c281 100755
--- a/scripts/poky-qemu-ifup
+++ b/scripts/poky-qemu-ifup
@@ -25,3 +25,8 @@ if [ "x$IFCONFIG" = "x" ]; then
25fi 25fi
26 26
27$IFCONFIG tap0 192.168.7.1 27$IFCONFIG tap0 192.168.7.1
28
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
31echo 1 > /proc/sys/net/ipv4/ip_forward
32iptables -P FORWARD ACCEPT