I have a laptop running Xubuntu 12.04 Desktop 32bit. It was a clean install about 3 years back. I took it abroad recently and used it on somebody else's network. I was getting intermittent name resolution problems for some very common websites. I fiddled around a bit and ended up setting their router to use Google's DNS servers. It then worked perfectly for 2 weeks. Problem solved - I thought.
However when I came back and connected to my router at home, DNS doesn't work at all. I've tried the laptop on a third network but still no name resolution. Other desktop PCs running Xubuntu 12.04 and 14.04, continue to work normally on my home network.
My router is at 192.168.2.1 and assigns 192.168.2.60 to the laptop.
$ nm-tool
...
IPv4 Settings:
Address: 192.168.2.60
Prefix: 24 (255.255.255.0)
Gateway: 192.168.2.1
DNS: 192.168.2.1
$ nslookup askubuntu.com
Server: 127.0.0.1
Address: 127.0.0.1#53
** server can't find askubuntu.com: SERVFAIL
Interestingly, if I sniff packets while doing the above:
$ sudo tcpdump -n -vv -i wlan0 -W 1200 | grep askubuntu.com
192.168.2.60.16887 > 192.168.2.1.53: [udp sum ok] 59738+% [1au] A? askubuntu.com. ar: . OPT UDPsize=4096 OK (42)
192.168.2.1.53 > 192.168.2.60.16887: [udp sum ok] 59738 q: A? askubuntu.com. 1/0/0 askubuntu.com. A 104.16.111.188 (47)
Suggests to me that name resolution is being done and an answer is being sent back.
If I specify the DNS server then it works:
$ nslookup askubuntu.com 192.168.2.1
Server: 192.168.2.1
Address: 192.168.2.1#53
Non-authoritative answer:
Name: askubuntu.com
Address: 104.16.113.188
I've tried various things suggested here: How do I fix DNS resolving which doesn't work after upgrading to Ubuntu 13.10 (Saucy)
$ nmcli dev list iface eth0 | grep IP4.DNS
IP4.DNS[1]: 192.168.2.1
The file /etc/resolv.conf
is a symbolic link that points at /run/resolvconf/resolv.conf
. It effectively contains only nameserver 127.0.0.1
. Despite that I tried sudo dpkg-reconfigure resolvconf
but no change.
I've tried commenting out the line dns=dnsmasq
in /etc/NetworkManager/NetworkManager.conf
and restarting Network Manager but no change. I uncommented the line again.
The only other recent tweak that might be related is that I installed the libunbound2
package on a desktop PC before I went abroad to satisfy a DKIM Verifier add-on (https://github.com/lieser/dkim_verifier/wiki/DNS) for Thunderbird. The add-on worked and still works fine. While abroad I installed the libunbound2
package on the laptop for the same reasons and it worked fine while abroad. My understanding was that I was just installing libraries for the add-on to use.
I'm completely stumped now. Any help appreciated.
DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN'
– BobS Jan 21 '16 at 18:50