2

After upgrading from Xubuntu 16.04 to 16.10, DNS lookups start failing after an amount of time, restarting dnsmasq appears to temporarily resolve the issue, but I'm forever restarting it throughout the day.

When the lookups stop working, Chrome gives me one of the following errors:

"ERR_NAME_NOT_RESOLVED", "DNS_PROBE_FINISHED_BAD_CONFIG", "DNS_PROBE_FINISHED_NXDOMAIN";

This is for both sites on the Internet and web interfaces served by other machines on my local network; if I try ssh to another machine on my network (e.g. my DNS server), I get the following:

➜  ~ ssh dns
ssh: Could not resolve hostname dns: Name or service not known

I had dnsmasq installed locally when running 16.04 so that I could have a wildcard DNS entry to ease development work (*.dev in my browser for different projects). My /etc/dnsmasq.conf looks like this:

listen-address=127.0.0.1
bind-interfaces
address=/dev/127.0.0.1

From what I understand, dnsmasq is installed by default on 16.10 in order to offer a local DNS cache, could there be some conflicting config somewhere that's breaking things?

I've been reading a bunch of solutions for similar DNS issues experienced by others, but none of them appear to be working for me. One was to make changes to /ets/nsswitch.conf (which did solve another issue I was having), of which mine currently looks like:

passwd:         compat
group:          compat
shadow:         compat

#hosts:          files resolve [!UNAVAIL=return] dns mdns4_minimal [NOTFOUND=return] mdns4 myhostname
hosts:          files resolve dns
networks:       files

protocols:      db files
services:       db files
ethers:         db files
rpc:            db files

netgroup:       nis

/etc/resolv.conf is often asked for in DNS questions, mine looks like:

# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 127.0.0.1

In the "Edit connections" interface for my NIC, I have my DNS servers set to 127.0.0.1, 192.168.0.254, 8.8.8.8 in IPv4 and ::1, fe80::ba27:ebff:fe78:2761 in IPv6.

I have another DNS server on my local network running dnsmasq that handles DHCP and mapping other static IPs to names - I'm not sure if this is relevant, this is the second of the IPv4/6 addresses above.

Any ideas as to what I could try to resolve this? (Other than telling cron to run service dnsmasq restart every so often!)

  • Set your network profile for Automatic (DHCP) addresses only and your DNS servers to 8.8.8.8,n.n.n.n. Leave out 127.0.0.1. And I assume that 192.168.0.254 is some local DNS server? Please explain. – heynnema Jan 30 '17 at 15:47
  • Sorry, forgot to mention, I have a static IP configured for my machine as I access it regularly from other devices; I'd rather not switch this to DHCP. I have removed localhost from both the IPv4 and IPv6 DNS server inputs though and will monitor it. 192.168.0.254 is a local DNS server used for caching, DHCP and mapping names to static IPs. – Kris Jan 30 '17 at 16:00
  • I do my static address mapping in my router and set all my clients to DHCP. This way I can control the network better, from one point. 192.168.0.254 is an odd address to use for a local DNS server. I place all of my "systemic" (bridges/etc) equipment at address < .100, and set my router's DHCP pool to start at .100. – heynnema Jan 30 '17 at 16:23
  • @heynnema Using the upper end of a subnet is no more or less odd than using the lower end. It's a subjective design choice that's a lot more common than you might expect. – Brian Cline Jun 12 '17 at 21:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.