Adding search domains to template resolv.conf

163 views
Skip to first unread message

w.peter...@gmail.com

unread,
Oct 22, 2015, 8:42:58 PM10/22/15
to qubes-users
This seems like it should be simple enough, but have not been able to figure it out. I need to add several search domains and they must be in all running VMs, but every change I try to make never appears in the AppVMs. What am I missing?

Daniel Schoepe

unread,
Oct 23, 2015, 9:54:16 AM10/23/15
to w.peter...@gmail.com, qubes-users
Did you shutdown the TemplateVM after changing the file and reboot the
AppVMs afterwards?

Best regards,
Daniel

Pete Howell

unread,
Oct 23, 2015, 10:21:19 AM10/23/15
to qubes-users, w.peter...@gmail.com
Yes, and it's absolutely driving me crazy.  I've tried a least a dozen methods, including a NetworkManager dispatcher script to update it after the fact.  I could probably use /rw/config/rc.local, but I want this to be a global change, so I'm trying to do it in the template.

Daniel Schoepe

unread,
Oct 23, 2015, 10:37:48 AM10/23/15
to Pete Howell, qubes-users, w.peter...@gmail.com
On Fri, 23 Oct 2015 16:21 +0200, Pete Howell wrote:
> Yes, and it's absolutely driving me crazy. I've tried a least a dozen
> methods, including a NetworkManager dispatcher script to update it after
> the fact. I could probably use /rw/config/rc.local, but I want this to be
> a global change, so I'm trying to do it in the template.

Is there anything running on the AppVMs that may overwrite this file
after startup? Does everything work if you change other files (outside
of /rw and /home) in the template?

Best regards,
Daniel

> On Friday, October 23, 2015 at 7:54:16 AM UTC-6, Daniel Schoepe wrote:
>>
>> On Fri, 23 Oct 2015 02:42 +0200, w.peter...@gmail.com <javascript:>
>> wrote:
>> > This seems like it should be simple enough, but have not been able to
>> > figure it out. I need to add several search domains and they must be
>> > in all running VMs, but every change I try to make never appears in
>> > the AppVMs. What am I missing?
>>
>> Did you shutdown the TemplateVM after changing the file and reboot the
>> AppVMs afterwards?
>>
>> Best regards,
>> Daniel
>>
>
> --
> You received this message because you are subscribed to the Google Groups "qubes-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to qubes-users...@googlegroups.com.
> To post to this group, send email to qubes...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/qubes-users/19382982-f6fb-49b9-a4eb-4f713d366c79%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Pete Howell

unread,
Oct 23, 2015, 1:46:21 PM10/23/15
to qubes-users, w.peter...@gmail.com
I think it's NetworkManager that creates it (not sure), which is why I tried creating a dispatcher script.  I've tried about 10 different ways to get the file created with the search directives, and no matter what I try, the file remains unchanged.

Marek Marczykowski-Górecki

unread,
Oct 23, 2015, 8:42:27 PM10/23/15
to Pete Howell, qubes-users
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On Fri, Oct 23, 2015 at 10:46:21AM -0700, Pete Howell wrote:
> I think it's NetworkManager that creates it (not sure), which is why I
> tried creating a dispatcher script. I've tried about 10 different ways to
> get the file created with the search directives, and no matter what I try,
> the file remains unchanged.

The file is automatically (re)created by `/usr/lib/qubes/setup-ip`
script. If you want, you can disable this by adding /etc/resolv.conf to
any (new) file in `/etc/qubes/protected-files.d/`. Then you'll need to
keep the whole /etc/resolv.conf in sync manually (not only search
option). But setting DNS to your NetVM IP should be just fine (assuming
you have one NetVM, not using TorVM etc).

- --
Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQEcBAEBCAAGBQJWKtPsAAoJENuP0xzK19csPyIH/izJb1p/cDJ+3Np/E2rJ5t9f
1nGKvPUnys1tAfyavirKT9ya5IKQ/hjPTfgAVF8gmMrWUCrnaO5rurDzv5ihqPgp
k1PATiWikikddccuu2+BEDL+6qxGJrK6F7zyEn2a5CJJknOW9Pl9G0O7jmAZpQyN
N0JBhynONVMe2iZRRHJWYe9Y4YXj9q6kxJXK8zqrRWgsaeaW3pspU2cvC0rTMLuQ
U3OkzDpHWlf7vbeRRkcFmcgYPj177MZNHFxES07HDQE+82jAf6rg0KbKudlAC9+s
Art/ooCKepvYrdLk6lA8qBmYHnZmNqlrce7e56jFxBoc/Zx5wzZRygMorHj8TFk=
=tW0s
-----END PGP SIGNATURE-----

mver...@gmail.com

unread,
Feb 15, 2016, 9:28:21 PM2/15/16
to qubes-users, w.peter...@gmail.com
Hi Pete, did you ever 'resolve' your issue? I've just moved to Qubes (3.0) and see similar behaviour - my NetVM has the correct search domains configured (viewable in the NetworkManager GUI as well as resolv.conf), but AppVMs do not.

Is manually maintaining the /etc/resolv.conf file the correct way to handle this requirement?

Thanks for any suggestions.

pho...@ccvschools.com

unread,
Feb 16, 2016, 9:49:43 AM2/16/16
to qubes-users, w.peter...@gmail.com, mver...@gmail.com
No, unfortunately, I never did resolve this -- it's still something I'd like to see fixed. It would be nice if there was an easy and straightforward way to do this.

the2nd

unread,
Aug 12, 2017, 7:39:09 AM8/12/17
to qubes-users, w.peter...@gmail.com, mver...@gmail.com, pho...@ccvschools.com
Hi,

i had the same issue and came up with a simple solution using qubes RPC and some shell scripts.

https://github.com/the2nd/qubes-dns-search

This works fine for me. The only problem is that the search domain is not added to a VMs resolv.conf on reboot. You have to re-connect your network for this.

Regards
the2nd
Reply all
Reply to author
Forward
0 new messages