Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

after setting my computer(macbook)'s dns server to 192.168.1.65, 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 192.168.1.65 –  Yang Zheng Apr 14 '11 at 7:15

3 Answers 3

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 192.168.1.65 to it permly –  Yang Zheng Apr 14 '11 at 8:34

Point your server's dns to 127.0.0.1 (/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 127.0.0.1 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: 192.168.1.8
Address: 192.168.1.8#53
share|improve this answer
    
> server Default server: 192.168.1.65 Address: 192.168.1.65#53 –  Yang Zheng Apr 14 '11 at 7:47

Your Answer

 
discard

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.