2012-01-10 12:10:16 +01:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
# Setup gateway for all the VMs this netVM is serviceing...
|
2014-10-01 06:51:58 +02:00
|
|
|
network=$(xenstore-read qubes-netvm-network 2>/dev/null)
|
2012-01-10 12:10:16 +01:00
|
|
|
if [ "x$network" != "x" ]; then
|
2014-10-01 06:51:58 +02:00
|
|
|
gateway=$(xenstore-read qubes-netvm-gateway)
|
|
|
|
netmask=$(xenstore-read qubes-netvm-netmask)
|
|
|
|
secondary_dns=$(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
|