0

I have Ubuntu 14.04 server and I have Bind9 installed on it and configured. On client computers I have the DNS server address set to this server. nslookup for my custom DNS entries return the correct IP addresses. However, when querying the local DNS server on the Ubuntu server, it fails:

** server can't find intranet: NXDOMAIN

I checked that my server uses itself as the with nmcli dev list iface eth0 | grep IP4. I also tried querying with nslookup intranet 10.0.2.1 on the server. The IP is the server's.

Why it doesn't work on the server itself?

0

The resolver on your server needs to be configured to use itself as it's DNS server. Check that /etc/resolv.conf has your IP address listed. E.g.:-

nameserver 10.0.2.1

Also, NSS must be configured so that the resolver actually uses DNS for name resolution (as opposed to other systems). Check that the file /etc/nsswitch.conf contains a line similar to the following:-

hosts:      files dns myhostname

This tells the resolver to first check the local database first (/etc/hosts) before trying DNS.

  • This doesn't work either. Same problem. The file gets overriden as soon as I save it. – MikkoP Jul 3 '14 at 11:57
  • Was the line originally there? I've added some more info... – garethTheRed Jul 3 '14 at 12:02
  • It's probably being overwritten by Network Manager. There's an article on askubuntu that might help - askubuntu.com/questions/201603/… – garethTheRed Jul 3 '14 at 12:54
  • garethTheRed's comment (above) is likely the proper answer. In Ubuntu, /etc/resolv.conf is overwritten at boot time. You'll need to edit /etc/network/interfaces like the link (that garethTheRed provided) indicates. You'll need a "dns-nameservers" line and a "dns-search" line. – joat Jul 5 '14 at 15:49

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.