hostname, nameserver (bind) and DNS records Query Timed out

  • bryan.kewl
  • 03/30/12
  • Offline
Posted: Sat, 2012-03-31 12:54

I an not an expert in LINUX nor Virtualmin nor networking, and have only basic knowledge.

I installed Virtualmin GPL on CentOS 6.2. The hostname of the machine is srv01.[mydomain.tld] (where [mydomain.td] is an actual registered domain). On the server I have only 1 IP so, I assign it to ns1.[mydomain.tld]. After this I updated the nameserver details for my domain on the domain registrar and pointed ns1 to the IP of th server. The first issue I received was BIND-chroot issue, and after reading here on forum, I removed BIND from chroot and BIND started. At this stage I was sure that everything will work normal, so I created a virtual server for [mydomain.tld]. Now I was sure that I can now access my site using the domain name.

Now I opened network-tools.com and tried to perform a tracert for [mydomain.tld] but it failed to resolve the domain name and following are the details from the page Retrieving DNS records for [mydomain.tld]... DNS servers ns1.[mydomain.tld] [IP] Query for DNS records for [mydomain.tld] failed: Timed out Whois query for [mydomain.tld]...

so I tried to ping srv01.[mydomain.tld] and failed. Then I tried to ping ns1.[mydomain.tld] and VOLA it worked. so my first guess was that maybe the NS on my server isn't working so I SSHed and performed nslookup google.com and here are the results

nslookup google.com

Server: 127.0.0.1 Address: 127.0.0.1#53

Non-authoritative answer: Name: google.com Address: 173.194.33.39 .... so i think that the nameserver is working properly on my server. After this I performed

nslookup [mydomain.tld] Server: 127.0.0.1 Address: 127.0.0.1#53

Non-authoritative answer: Name: [mydomain.tld] Address: IP

So now I am confused, it looks the server is resolving the name properly locally but not working on internet. I also checked all the Zone records for [mydomain.tld] and it contains following records [mydomain.tld]. -- NS -- ns1.[mydomain.tld]. [mydomain.tld]. -- NS -- ns2.[mydomain.tld]. [mydomain.tld]. -- A -- IP www.[mydomain.tld]. -- A -- IP ns1.[mydomain.tld]. -- A -- IP ns2.[mydomain.tld]. -- A -- IP

plus A records for subdomain ftp.[mydomain.tld], m.[mydomain.tld], localhost.[mydomain.tld], webmail.[mydomain.tld], admin.[mydomain.tld] and mail.[mydomain.tld] pointing to the server's IP plus MX and SPF records.

Any help to fix this issue is really appreciated. Thanks in advance.

Brian


thanks everyone for the great

  • bryan.kewl
  • 03/30/12
  • Offline
  • Tue, 2012-04-03 00:11

thanks everyone for the great help you all provided in solving the issue. I really appreciated the active community and all the help.

thumb up Brian


Sorry. This is number#xxx

  • ronald
  • 12/20/07
  • Offline
  • Tue, 2012-04-03 03:52

Sorry. This is number#xxx about centos 6 and bind.
It would be useful to have the domainname in question so various people can do some research themselfs ..
If it is Query Timed Out then DNS is working and the IP can be found. Your system however doesn't listen to the IP probably...

So you can try to add your IP's to the /etc/named.conf under options. The default should work

options {
   listen-on port 53 {
        any;
       };

but sometimes it doesn't and you can try this:
options {
   listen-on port 53 {
        123.123.123.123;
       };
were 123 etc is your IP and then restart BIND from the console $service named restart