Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have setup a DNS server in a LAN. the BIND9 DNS server sits on

after setting my computer(macbook)'s dns server to, i am able to access the local domain setted up using bind, http://xyz.local/.

But when I access the url on the ubuntu server itself, it tells me that the url cannot be found. I can dig the link without problem, but the nslookup failed.

Any idea on how can I fix it so that the dns ubuntu box itself can also resolve the url?

share|improve this question
What's in /etc/resolv.conf on the server? It is probably pointing to wrong dns server. – rvs Apr 14 '11 at 7:10
@rvs this is the content of /etc/resolv.conf: nameserver – Yang Zheng Apr 14 '11 at 7:15
up vote 2 down vote accepted

Could be mDNS/DNS-SD.

The symptoms would be that name-resolution that goes through nss/libc fails (i.e. when you use applications like a browser, ping, etc.) but name-resolution with applications that query dns directly themselves (i.e. host, dig, etc.) succeeds in resolving the name.

If this is the case, on ubuntu you could try changing the hosts-entry in the file /etc/nsswitch.conf (remove mdns4_minimal [NOTFOUND=return]) to say something like:

hosts:          files dns mdns4
share|improve this answer
hi kjetil, it work! Thank you so much!!!! – Yang Zheng Apr 14 '11 at 8:33
another problem is that the ubuntu keeps overwriting the dns ip in resolv.conf after reboot, how can i add to it permly – Yang Zheng Apr 14 '11 at 8:34

Point your server's dns to (/etc/resolv.conf) and configure bind to forward the rest to your original isp dns-es. Btw. Do you have reverse dns configured for your network addresses?

share|improve this answer
hi, yes i do have the reverse dns zone, the problem now is the other computer can access the local domains without problem, only the machine host the dns cannot resolve the domain, i also tried adding nameserver to /etc/resolv.conf, but no luck.. – Yang Zheng Apr 14 '11 at 7:32
do i need to restart the server ? – Yang Zheng Apr 14 '11 at 7:36

Have you tried restart the system, in order to flush any caches. Also when you start nslookup and give the command server, what nameserver it writes. Ex:

> server
Default server:
share|improve this answer
> server Default server: Address: – Yang Zheng Apr 14 '11 at 7:47

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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