diff options
author | Marcin Juszkiewicz <hrw@openedhand.com> | 2008-05-08 10:56:40 +0000 |
---|---|---|
committer | Marcin Juszkiewicz <hrw@openedhand.com> | 2008-05-08 10:56:40 +0000 |
commit | 909ea433f1e5b686e20636fcdb553f6890b47f02 (patch) | |
tree | 606eb5487b467e83a6050b831ddda44ef08b0286 /scripts | |
parent | afec17a0c5bf8c9988f016d31e98ed5ac7e96d04 (diff) | |
download | poky-909ea433f1e5b686e20636fcdb553f6890b47f02.tar.gz |
poky-qemu-ifup: added NAT setup
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@4457 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/poky-qemu-ifup | 5 |
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 | |||
25 | fi | 25 | fi |
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 | ||
30 | iptables -A POSTROUTING -t nat -j MASQUERADE -s 192.168.7.0/24 | ||
31 | echo 1 > /proc/sys/net/ipv4/ip_forward | ||
32 | iptables -P FORWARD ACCEPT | ||