mirror of
https://git.yoctoproject.org/poky
synced 2026-03-16 04:09:39 +01:00
poky-qemu-ifup: added NAT setup
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@4457 311d38ba-8fff-0310-9ca6-ca027cbcb966
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user