I got DNS query timeout when I tested DNS with dnsquery.org.

You don't need to use the 'query-source port 53;" option.

I can't find any problem. If I use the link you posted I do get results and no timeouts. Or you already fixed it.

Ah I see what you mean at the bottom of the page, that's odd. Because I can telnet to the ns2, so it is responding.

Maybe you blocked something in your named.conf? The first part should look like this:
Code:
options {
        //listen-on port 53 { 127.0.0.1; };
        //listen-on-v6 port 53 { ::1; };
        directory       "/var/named";
        dump-file       "/var/named/data/cache_dump.db";
        statistics-file "/var/named/data/named_stats.txt";
        memstatistics-file "/var/named/data/named_mem_stats.txt";
        //allow-query     { localhost; };
        allow-recursion { localnets; };
        allow-transfer {"none";};
        //recursion yes;
which should be enough to allow query's.

Your DNS looks fine:
https://intodns.com/hostbangyai.com

I would not use 1 ip for 2 nameservers.
 
Last edited:
I used CentOS 6.9. In my named.conf, it looks like the contents that you showed me. I don't know why this problem happened. In resolv.conf, I changed nameserver to 8.8.8.8 and 8.8.4.4 instead of the DNS of the ISP, but it still get timeout.

One thing that I found is that when I query for a specific record e.g. A or MX, it returns result. By the way, when I query for ANY, it returns timeout.

You can try : http://network-tools.com/nslook/Def...3&class=1&port=53&timeout=5000&go.x=20&go.y=9

then, you can change to query for a specific record.

Is there any mistake I have made?
 
It has nothing to do with resolv.conf and you can better change it back to the DNS of the ISP, because you might run into blocks or timeouts when your mailserver starts doing RBL lookups. If you're running your own nameserver, you can even use 127.0.0.1 as first nameserver in resolv.conf.
But that has to do with local lookups, not with DNS timeouts.

I don't think you made a mistake. It seems as there is a routing problem, because network-tools.com has issues doing a dns query.

But intodns.com and my servers don't have any issues connecting to your DNS server or making a query at your dns server. I just tried again with:
Code:
dig @ns1.hostbangyai.com www.hostbangyai.com
And same with dig -t MX and dig -t TXT hostbangyai.com and I get a response. Intodns also gets responses.

So as far as I can see, nothing is wrong with your DNS except that it's not advisable to use the same ip for 2 nameservers.
I would advise you to contact your hosting provider or your datacenter because it looks like routing issues to me, or some domains are blocked. Either one of these is giving you issues.
 
Back
Top