I'm having DNS issues on a new install of Ubuntu 16.04:
kqs@mycomputer:~$ nslookup localserver Server: 127.0.0.1 Address: 127.0.0.1#53 ** server can't find localserver: NXDOMAIN
But if I specify the DNS server (or sometimes if I just wait awhile), it works:
kqs@mycomputer:~$ nslookup localserver 192.168.0.1 Server: 192.168.0.1 Address: 192.168.0.1#53 Name: localserver.localdomain Address: 192.168.0.24
And this is the same DNS server that shows up first in Network Manager:
kqs@mycomputer:~$ nmcli device show IP4.ADDRESS: 192.168.0.152/24 IP4.GATEWAY: 192.168.0.1 IP4.ROUTE: dst = 169.254.0.0/16, nh = 0.0.0.0, mt = 1000 IP4.DNS: 192.168.0.1 IP4.DNS: 188.8.131.52 IP4.DNS: 184.108.40.206
It seems to be the same problem as "dnsmasq sometimes resolves things, sometimes it doesn't" and "Intranet address resolution and dnsmasq", but in that solution they disable
dnsmasq by commenting out the
dns=dnsmasq line in
However, I'd like to troubleshoot
dnsmasq rather than bypassing it completely.
So my questions are:
- My understanding is that
dnsmasqis a lightweight DNS server running on my computer. Presumably, the Network Manager DNS settings are used to configure
dnsmasq, but ultimately it is
dnsmasqthat is solely responsible for handling DNS lookups (with the help of upstream DNS servers as it deems necessary). Is this correct?
- Can I see how
dnsmasqis handling a particular DNS lookup? i.e. is it answering it from its cache? Which upstream DNS server is it forwarding it to?
- Can I instruct
dnsmasqto use a particular DNS server for the local domain?