1

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.

BobS
  • 11
  • Can you please give me output cat /etc/resolvconf/resolv.conf.d/head – sohel4r Jan 21 '16 at 18:41
  • @sohel4r ' /etc/resolvconf/resolv.conf.d/head' contains just two commented lines: ' # 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'

    – BobS Jan 21 '16 at 18:50
  • Please add this two line nameserver 8.8.8.8 nameserver 8.4.4.4 then restart network manager or restart pc – sohel4r Jan 21 '16 at 18:54
  • @sohel4r. Now I get: '$ nslookup askubuntu.com' 'Server: 8.8.8.8' 'Address: 8.8.8.8#53' 'Non-authoritative answer:' 'Name: askubuntu.com' 'Address: 104.16.112.188' (Sorry, struggling with the markup here.) – BobS Jan 21 '16 at 19:12
  • Your problem was't solved ? – sohel4r Jan 21 '16 at 20:04
  • @sohel4r. I wasn't sure if you were suggesting a diagnostic or a fix. Doesn't that force the laptop to use Google's DNS servers? I'm hoping to get the laptop to use the DNS servers provided by the router - whatever they happen to be. No other PCs on the network have entries in '/etc/resolvconf/resolv.conf.d/head'. I'm going to try 'nameserver 192.168.2.1' in '/etc/resolvconf/resolv.conf.d/head' now though. – BobS Jan 21 '16 at 20:21
  • @sohel4r. Putting 'nameserver 192.168.2.1' in '/etc/resolvconf/resolv.conf.d/head' works too but only if the router happens to be at 192.168.2.1 – BobS Jan 21 '16 at 20:53
  • I think it's best idea to use google dns or open dns – sohel4r Jan 22 '16 at 10:09

0 Answers0