Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I installed a Forwarding DNS server on Centos 5.10 and it is resolving addresses e.g When I stopped named (service named stop) and tried to dig (dig @localhost A there was a failure to resolve the address. I checked and see the caching daemon nscd is running.

Does this mean the server is not caching at all? How can I get it to cache?


    // Those options should be used carefully because they disable port
    // randomization
// query-source    port 53; 
// query-source-v6 port 53;

// Put files that named is allowed to write in the data/ directory:
    listen-on port 53 {;;};
    directory "/var/named"; // the default
    dump-file       "/var/named/chroot/var/named/data/cache_dump.db";
    statistics-file     "/var/named/chroot/var/named/data/named_stats.txt";
    memstatistics-file  "/var/named/chroot/var/named/data/named_mem_stats.txt";
   // allow-query {localhost;;;};
    recursion yes;
    //allow-query  { localhost;;};
    allow-query     { localhost; any; };
    allow-query-cache    { localhost; any; };
    forward only;  
    forwarders {;;};

    dnssec-enable yes;
    // dnssec-lookaside auto;

    /* Path to ISC DLV key */
    // bindkeys-file "/etc/named.iscdlv.key";

    // managed-keys-directory "/var/named/dynamic";

}; logging {

    channel default_debug {
            file "data/";
            severity dynamic;

}; **

share|improve this question

DNS caching on Linux (via nscd) is traditionally disabled by default. Check /etc/nscd.conf if you want to enable it. Be warned, it might create more problems for you. I personally have never relied on it for DNS. If you want DNS resolution to keep working when/if Bind crashes, AND you still have network connectivity, it's better to just specify more servers in /etc/resolv.conf

The reason dig @ fails to work is that it consults the DNS server directly through port 53. It does not use the NSS functions.

share|improve this answer

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.