1

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?

2
  • What's in /etc/resolv.conf on the server? It is probably pointing to wrong dns server.
    – rvs
    Apr 14, 2011 at 7:10
  • @rvs this is the content of /etc/resolv.conf: nameserver 192.168.1.65
    – Yang Zheng
    Apr 14, 2011 at 7:15

3 Answers 3

2

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
1
  • 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, 2011 at 8:34
1

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?

2
  • 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, 2011 at 7:32
  • do i need to restart the server ?
    – Yang Zheng
    Apr 14, 2011 at 7:36
1

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
1
  • > server Default server: 192.168.1.65 Address: 192.168.1.65#53
    – Yang Zheng
    Apr 14, 2011 at 7:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .