vm: route through specific host, not directly interface (#355)

This it to not fill ARP cache with any host that VM connects to.
This commit is contained in:
Marek Marczykowski 2011-09-16 00:06:14 +02:00
parent 3dc4b3a2ed
commit 13fc2bf7b0

View File

@ -7,7 +7,8 @@ if [ x$ip != x ]; then
secondary_dns=`/usr/bin/xenstore-read qubes_secondary_dns`
/sbin/ifconfig $INTERFACE $ip netmask 255.255.255.255
/sbin/ifconfig $INTERFACE up
/sbin/route add default dev $INTERFACE
/sbin/route add -host $gateway dev $INTERFACE
/sbin/route add default gw $gateway
/sbin/ethtool -K $INTERFACE sg off
echo "nameserver $gateway" > /etc/resolv.conf
echo "nameserver $secondary_dns" >> /etc/resolv.conf