Franz:
>> Back to my initial question:
>> > Would you mind adding a configuration possibility to allow networked VMs
>> > that do not have a default gw and an empty /etc/resolv.conf?
>> >
>> > Doesn't seem like a very exotic feature request, or does it?
>> >
>> >
> It seems to me that nobody really understood why you want this feature and,
> most important, which is the compelling use case that would justify the
> effort to implement it.
The use case is rather simple:
Have an additional safeguard to avoid accidentially leaking packets even
in case the upstream proxyvm's config (the one that usually ensures
proxy obedience) gets messed up (i.e. by a broken update).
(but there are certainly other use cases for non-routed networking I guess)
I assumed that an implementation would not be to big of an effort?
add two additional boolean qvm-prefs, something like
setdefaultgw = true/false
setdns = true/false
(both default to true)
Expose them to the VM via xenstore.
Add two additional if blocks to /usr/lib/qubes/setup-ip (if that is
indeed the case where it needs to go?)
9a10,13
>
> setdefaultgw=`$XENSTORE_READ setdefaultgw 2> /dev/null`
> setdns=`$XENSTORE_READ setdns 2> /dev/null`
>
17c21,23
< /sbin/route add default gw $gateway
---
> if [ x$setdefaultgw == 'xtrue' ]; then
> /sbin/route add default gw $gateway
> fi
20,21c26,29
< echo "nameserver $gateway" > /etc/resolv.conf
< echo "nameserver $secondary_dns" >> /etc/resolv.conf
---
> if [ x$setdns == 'xtrue' ]; then
> echo "nameserver $gateway" > /etc/resolv.conf
> echo "nameserver $secondary_dns" >> /etc/resolv.conf
> fi
47c55
< if [ "x$network" != "x" ]; then
---
> if [ "x$network" != "x" ] && [ x$setdns == "xtrue" ]; then
I assume /var/run/qubes-service/network-manager is only used for netvms,
so I should not care about line 40 I guess.