caching only name server

Chris Henderson henders254 at gmail.com
Sun Nov 1 05:26:37 UTC 2009


I am trying to setup a caching only name server on mail gateway and
wondering if I am doing it right. Here is what I have done on RHEL
5.4.

Installed RPMs:

caching-nameserver-9.3.6-4.P1
bind-libs-9.3.6-4.P1
bind-utils-9.3.6-4.P1
bind-chroot-9.3.6-4.P1
bind-9.3.6-4.P1


I have never touched the file /etc/named.caching-nameserver.conf as it
says: "DO NOT EDIT THIS FILE - use system-config-bind or use an editor
to create named.conf - edits to this file will be lost on
caching-nameserver package upgrade."

Created the /var/named/chroot/etc/named.conf
file with the following:

options {
       listen-on port 53 { 127.0.0.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";

       // My primary, secondary DNS servers
       forwarders {203.90.12.33; 203.90.18.21;};
       forward first;

       // maximum time (in seconds) for which the server will cache
       // positive answers
       // set to four hours.

       max-cache-ttl 14400;

       allow-query     { localhost; };
       allow-query-cache { localhost; };
};

logging {
       channel default_debug {
               file "data/named.run";
               severity dynamic;
       };
};

view localhost_resolver {
       match-clients      { localhost; };
       match-destinations { localhost; };
       recursion yes;
       include "/etc/named.rfc1912.zones";
};

- created a symlink and changed ownership of named.conf: ln -sf
/var/named/chroot/etc/named.conf /etc/named.conf && chown root:named
/var/named/chroot/etc/named.conf

- here is my /etc/resolv.conf output:

search mydomain.com
nameserver 127.0.0.1

Everything is working fine: I can resolve DNS queries using 127.0.0.1
as my DNS server.

Have I done the setup correctly? Anything I am missing?

Thanks.




More information about the redhat-sysadmin-list mailing list