Using dnsmasq with network provided DNS server

0

Sorry in advance for a potentially weird title, I'm not 100% sure of the terminology surrounding what I am trying to ask, but I can hopefully describe it well enough.

I would like to use the network provided DNS server as the fallback for dnsmasq.

For example at home I have my router configured to use a pihole for dns resolution. At work when we join the VPN some additional nameservers are usually added so we can resolve internal resources. Without dnsmasq running my machine will use these DNS servers without my intervention.

After installing dnsmasq I lost all of this functionality. My etc/resolv.conf file only lists the loopback ip as a nameserver and DNS resolution fails for any public website unless I add a line like server=1.1.1.1 to the dnsmasq configuration files. This is obviously just a hardcoded dns server. The side effect is I don't get the benefits of my pihole when I'm at home (not the biggest deal) and I also cannot resolve internal work URLs on my work network (a much bigger deal).

How can I use dnsmasq in combination with the "typical" dns process for my machine? The only reason we're using dnsmasq is for some local dns resolution for *.dev urls, everything else I want to go through the typical process (or it can go through dnsmasq as long as dnsmasq checks the correct upstream dns servers and not a hardcoded one of my choosing)

In case it helps I'm on Ubuntu 18.04.

EDIT: Pretty sure this has something to do with the interaction between dhclient, resolvconf, and dnsmasq but still can't quite figure out why it's not working. I'll answer my own question if I ever get it figured out.

gnomed

Posted 2019-03-06T23:55:43.563

Reputation: 121

bump bump bump bump – gnomed – 2019-03-13T21:09:52.690

No answers