caching only name server

pbdlists at pinboard.com pbdlists at pinboard.com
Sun Nov 1 15:30:31 UTC 2009


Hi Chris,

On a quick overview, I don't spot anything in your config which looks
wrong. You also have restricted queries to localhost and bind is only
listening on the loopback address. Things can always be tweaked this way
or the other, but if it does work for you, I'd say go with it.

Cheers,

Kurt

On Sun, Nov 01, 2009 at 04:26:37PM +1100, Chris Henderson wrote:
> 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.
> 
> --
> redhat-sysadmin-list mailing list
> redhat-sysadmin-list at redhat.com
> https://www.redhat.com/mailman/listinfo/redhat-sysadmin-list




More information about the redhat-sysadmin-list mailing list