| Submitter | Scott Garman |
|---|---|
| Date | May 24, 2012, 9:38 p.m. |
| Message ID | <78c7a82a2e3214eaec3c559269e3cc6c219759c0.1337892418.git.scott.a.garman@intel.com> |
| Download | mbox | patch |
| Permalink | /patch/28693/ |
| State | New |
| Headers | show |
Comments
Patch
diff --git a/scripts/runqemu-ifup b/scripts/runqemu-ifup index 3bd9980..f80538f 100755 --- a/scripts/runqemu-ifup +++ b/scripts/runqemu-ifup @@ -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