2012-01-10 12:10:16 +01:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
# Setup gateway for all the VMs this netVM is serviceing...
|
2013-03-14 04:23:32 +01:00
|
|
|
network=$(/usr/bin/xenstore-read qubes-netvm-network 2>/dev/null)
|
2012-01-10 12:10:16 +01:00
|
|
|
if [ "x$network" != "x" ]; then
|
2013-03-14 04:23:32 +01:00
|
|
|
gateway=$(/usr/bin/xenstore-read qubes-netvm-gateway)
|
|
|
|
netmask=$(/usr/bin/xenstore-read qubes-netvm-netmask)
|
|
|
|
secondary_dns=$(/usr/bin/xenstore-read qubes-netvm-secondary-dns)
|
2012-01-10 12:10:16 +01:00
|
|
|
modprobe netbk 2> /dev/null || modprobe xen-netback
|
2013-03-13 02:26:40 +01:00
|
|
|
echo "NS1=$gateway" > /var/run/qubes/qubes-ns
|
|
|
|
echo "NS2=$secondary_dns" >> /var/run/qubes/qubes-ns
|
|
|
|
/usr/lib/qubes/qubes-setup-dnat-to-ns
|
2012-01-10 12:10:16 +01:00
|
|
|
echo "1" > /proc/sys/net/ipv4/ip_forward
|
2013-04-29 02:48:18 +02:00
|
|
|
/sbin/ethtool -K eth0 sg off || :
|
2012-01-10 12:10:16 +01:00
|
|
|
fi
|