From 909ea433f1e5b686e20636fcdb553f6890b47f02 Mon Sep 17 00:00:00 2001 From: Marcin Juszkiewicz Date: Thu, 8 May 2008 10:56:40 +0000 Subject: poky-qemu-ifup: added NAT setup git-svn-id: https://svn.o-hand.com/repos/poky/trunk@4457 311d38ba-8fff-0310-9ca6-ca027cbcb966 --- scripts/poky-qemu-ifup | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'scripts') diff --git a/scripts/poky-qemu-ifup b/scripts/poky-qemu-ifup index 5cf48d7b8..d68e64c28 100755 --- a/scripts/poky-qemu-ifup +++ b/scripts/poky-qemu-ifup @@ -25,3 +25,8 @@ if [ "x$IFCONFIG" = "x" ]; then fi $IFCONFIG tap0 192.168.7.1 + +# setup NAT for tap0 interface to have internet access in QEMU +iptables -A POSTROUTING -t nat -j MASQUERADE -s 192.168.7.0/24 +echo 1 > /proc/sys/net/ipv4/ip_forward +iptables -P FORWARD ACCEPT -- cgit v1.2.3