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

i had setup bind dns server on centos. from local lan it will work fine but from remote when i tried to nslookup ..it will give reply like "DNS request timed out...timeout was 2 seconds."

what is the problem?

this is my bind config----

// Red Hat BIND Configuration Tool

options {
        directory "/var/named";
        dump-file "/var/named/data/cache_dump.db";
        statistics-file "/var/named/data/named_stats.txt";
        query-source address * port 53;
};

controls {
           inet 127.0.0.1 allow {localhost; } keys {rndckey; };
};

acl internals {
    127.0.0.0/8;
    192.168.0.0/24;
    10.0.0.0/8;

};

view "internal" {
    match-clients { internals; };
    recursion yes;
    zone "mydomain.com" {
       type master;
       file "mydomain.com.zone";
    };


zone "0.168.192.in-addr.arpa"  {
      type master;
      file "0.168.192.in-addr.arpa.zone";

};

zone "." IN {
        type hint;
        file "named.root";
};

zone "localdomain." IN {
        type master;
        file "localdomain.zone";
        allow-update { none; };
};

zone "localhost." IN {
        type master;
        file "localhost.zone";
        allow-update { none; };
};

zone "0.0.127.in-addr.arpa." IN {
        type master;
        file "named.local";
        allow-update { none; };

};

zone "0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa." I
N {
        type master;
        file "named.ip6.local";
        allow-update { none; };
};

zone "255.in-addr.arpa." IN {
        type master;
        file "named.broadcast";
        allow-update { none; };
};

zone "0.in-addr.arpa." IN {
        type master;
        file "named.zero";
        allow-update { none; };
};

};
view "external" {
 match-clients { any; };
    recursion no;
    zone "mydomain.com" {
       type master;
       file "mydomain.com.zone";
   //    file "/var/named/chroot/var/named/mydomain.com.zone";
    };


zone "0.168.192.in-addr.arpa"  {
      type master;
      file "0.168.192.in-addr.arpa.zone";
};

};

include "/etc/rndc.key";
share|improve this question
    
We need a LOT more information than that. Please post your named.conf file (edit it to remove anything you don't want us to see). –  John Gardeniers Jun 12 '10 at 7:36
add comment

5 Answers

At first, just check your DNS resolver. i mean the machines you used to see nslookup output.
try this command to see your own dns caching server's performance.

nslookup mydomain.com 8.8.8.8
for query from google dns cache. it's important to check several dns caching servers to see the performance.

if you are in TR. Also try these caching servers to see performance difference.
193.140.100.215 (METU dns cache) and 88.255.129.22 (My own caching server).
if you still have timeout with these Dns caching serves.

try intodns.com to confirm your connection & bind config.
eg: http://www.intodns.com/mydomain.com

share|improve this answer
1  
please do not use nslookup for DNS debugging it is a tool thats different on every platform and does not provide much output of value, dig is much much much better for the task –  ZaphodB Apr 8 '11 at 23:51
add comment

Do you have a path through your firewall to the service?

share|improve this answer
    
yes port 53 is open at my firewall –  sahil007 Jun 12 '10 at 12:54
    
@sahil: Did you open both TCP and UDP? –  grawity Jun 12 '10 at 14:34
add comment

This is the first points I would focus at

  • you have to ensure your router (between WAN and LAN) routes the DNS ports UDP and TCP to your DNS server.

  • the firewalls must be opened on the way.

  • if you have apparmor installed, you must check that all the paths to your map files have their access authorized

  • if you try to resolve a domain for which you just subscribed, and the name servers were filled not long ago, you may have to wait for the NS delegation information, from TLD, for your domain to be propagated worldwide (may take two days)

Try from a Unix/Linux machine

  host mydomain.com myserver
share|improve this answer
add comment

I assume that you're testing this from Windows, no-one normal use nslookup when he is able to use dig or host :). How exactly you perform the test?

What do you see if you do:

nslookup mastermatrix

or

nslookup mastermatrix.localdomain

or

nslookup mastermatrix.localdomain.

?

Could you show output of ipconfig /all command, I'm interested in following options:

  • default domain
  • DNS suffix search list

Last but not least, could you start Wireshark during test and filter for tcp/udp 53. This should give you an answer.

share|improve this answer
add comment

allow-recursion { internal; };

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.