dig localhost doesn't give the answer section
I'am trying to setup a DNS server on centos. My problem is that when I try to do dig google.com it works... but when i hit dig localhost it doesn't give the answer section also nslookup doesn't give the output.
[root@3i etc]# dig localhost ; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.23.rc1.el6_5.1 <<>> localhost ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 3763 ;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0 ;; QUESTION SECTION: ;localhost. IN A ;; AUTHORITY SECTION: . 10510 IN SOA a.root-servers.net. nstld.verisign-grs.com. 2014042701 1800 900 604800 86400 ;; Query time: 18 msec ;; SERVER: 127.0.0.1#53(127.0.0.1) ;; WHEN: Sun Feb 9 13:39:47 2014 ;; MSG SIZE rcvd: 102 [root@3i etc]# [root@3i etc]# nslookup localhost Server: 127.0.0.1 Address: 127.0.0.1#53 ** server can't find localhost: NXDOMAIN [root@3i etc]# Any help would be appreciated...!!! |
please post the contents of /etc/named.conf and all of your zone files
|
dig a specific name which you have configured in your local DNS server
|
fwiw, on my centos 6.5 server that's successfully running bind, dig localhost doesn't return an answer either. I think localhost is normally defined in your /etc/hosts file not in the dns server.
|
Quote:
|
I had the same problem when I first tried to set it up on a CentOS box. Comes out that the culprit was SELinux. Turn off the SELinux temporarily and then try to 'dig' localhost to see if that works.
|
Hello folks,
Sorry for the late reply..... :( :( was out of town for some days... I checked and found out that i forgot to configure iptables. port 53 is not allowed by iptables by default, we have to change the configuration of iptables for it. did the necessary changes and bam...!!! everything was working smoothly.... :) :) Thanks for the replies... :) :) |
All times are GMT -5. The time now is 03:49 PM. |