A beginners question regarding a caching-only name server

Patrick Rynhart P.Rynhart at massey.ac.nz
Fri Apr 8 09:58:17 UTC 2011


I am new to using BIND and thought that I would start by setting up a
caching-only name server on a VM running CentOS 5.5.  While in this
mode, my understanding is that named should be passively listening for
any DNS requests that are resolved and be adding them to its local DB.

Adding localhost to /etc/resolv.conf shouldn't be necessary in order for
entries to be added to the DB but obviously required if you want to make
use of the DNS caching.

What I'm observing is that any DNS requests that are resolved aren't
being added to the DB - i.e. the result of "rndc dumpdb" is always
empty.  My named.conf file is as posted inline below; this is a vanilla
named.caching-nameserver.conf (as packaged by CentOS) aside from my
adding the VMWare subnet 192.168.239.0/24 which my VM is on.  I also
post the output of "named -g" along with named.local below.

Any assistance would be appreciated.

named -g
--------
[root at localhost named]# named -g
08-Apr-2011 21:11:39.672 starting BIND 9.3.6-P1-RedHat-9.3.6-4.P1.el5_5.3 -g
08-Apr-2011 21:11:39.673 found 1 CPU, using 1 worker thread
08-Apr-2011 21:11:39.673 using up to 4096 sockets
08-Apr-2011 21:11:39.679 loading configuration from '/etc/named.conf'
08-Apr-2011 21:11:39.680 max open files (1024) is smaller than max
sockets (4096)
08-Apr-2011 21:11:39.681 using default UDP/IPv4 port range: [1024, 65535]
08-Apr-2011 21:11:39.682 using default UDP/IPv6 port range: [1024, 65535]
08-Apr-2011 21:11:39.684 listening on IPv4 interface lo, 127.0.0.1#53
08-Apr-2011 21:11:39.684 listening on IPv4 interface eth0,
192.168.239.141#53
08-Apr-2011 21:11:39.686 /etc/named.conf:24: using specific query-source
port suppresses port randomization and can be insecure.
08-Apr-2011 21:11:39.686 /etc/named.conf:25: using specific query-source
port suppresses port randomization and can be insecure.
08-Apr-2011 21:11:39.687 command channel listening on 127.0.0.1#953
08-Apr-2011 21:11:39.687 command channel listening on ::1#953
08-Apr-2011 21:11:39.687 ignoring config file logging statement due to
-g option
08-Apr-2011 21:11:39.689 zone 0.in-addr.arpa/IN/localhost_resolver:
loaded serial 42
08-Apr-2011 21:11:39.689 zone
0.0.127.in-addr.arpa/IN/localhost_resolver: loaded serial 1997022700
08-Apr-2011 21:11:39.690 zone 255.in-addr.arpa/IN/localhost_resolver:
loaded serial 42
08-Apr-2011 21:11:39.690 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/IN/localhost_resolver:
loaded serial 1997022700
08-Apr-2011 21:11:39.690 zone localdomain/IN/localhost_resolver: loaded
serial 42
08-Apr-2011 21:11:39.691 zone localhost/IN/localhost_resolver: loaded
serial 42
08-Apr-2011 21:11:39.691 running  <------ I perform successful DNS
queries on the box at this point
08-Apr-2011 21:12:05.091 dumpdb started
08-Apr-2011 21:12:05.092 dumpdb complete <------ db is always empty

# rndc dumpdb
# <----- no output


named.conf
----------

options {
        listen-on port 53 { 127.0.0.1; 192.168.239.0/24; };
        //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";

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

        allow-query     { localhost; 192.168.239.0/24; };
        allow-query-cache { localhost; 192.168.239.0/24; };
};
logging {
        channel default_debug {
                file "data/named.run";
                severity dynamic;
        };
};
view localhost_resolver {
        match-clients      { localhost; 192.168.239.0/24;};
        match-destinations { localhost; 192.168.239.0/24;};
        recursion yes;
        include "/etc/named.rfc1912.zones";
};


named.local
-----------

$TTL    86400
@       IN      SOA     localhost. root.localhost.  (
                                      1997022700 ; Serial
                                      28800      ; Refresh
                                      14400      ; Retry
                                      3600000    ; Expire
                                      86400 )    ; Minimum
        IN      NS      localhost.
1       IN      PTR     localhost.




More information about the bind-users mailing list