mirror of
git://git.yoctoproject.org/poky.git
synced 2025-07-19 21:09:03 +02:00
runqemu-ifup: enable ip masquerading for QEMU NAT addresses
Fix the IP masquerading settings so that networked QEMU sessions can reach external networks. This is a partial fix for [YOCTO #2329]. (From OE-Core rev: 14c4ce77b5c3738a8a9ea7d724de7ce9efff18c4) Signed-off-by: Scott Garman <scott.a.garman@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
2874efa132
commit
0f95925b4c
|
@ -100,7 +100,8 @@ dest=$[ (`echo $TAP | sed 's/tap//'` * 2) + 2 ]
|
|||
$ROUTE add -host 192.168.7.$dest $TAP
|
||||
|
||||
# setup NAT for tap0 interface to have internet access in QEMU
|
||||
$IPTABLES -A POSTROUTING -t nat -j MASQUERADE -s 192.168.7.0/24
|
||||
$IPTABLES -A POSTROUTING -t nat -j MASQUERADE -s 192.168.7.$n/32
|
||||
$IPTABLES -A POSTROUTING -t nat -j MASQUERADE -s 192.168.7.$dest/32
|
||||
echo 1 > /proc/sys/net/ipv4/ip_forward
|
||||
$IPTABLES -P FORWARD ACCEPT
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user