DNS — Configure a caching-only name server to forward DNS queries

I am not sure what the difference si between forwarding queries and caching queries – they both forward to another location.

There is a good walkthrough of setting up a chaching nameserver at http://www.redhat.com/magazine/025nov06/features/dns/

Install the needed components yum install bind bind-utils bind-libs bind-chroot caching-nameserver

copy /etc/named.conf to /var/named/chroot/etc/
edit /var/named/chroot/etc/named.conf

  • Change listen-on port from; to any;
  • Change allow-query from localhost; to any;
  • Add forwarders {;; }; and forward only; to the options section

Restart dns – service named restart
Edit /etc/resolve.conf to use the local DNS server

2 thoughts on “DNS — Configure a caching-only name server to forward DNS queries

  • October 5, 2011 at 2:47 am

    Hello Friend – after attending the RH255 class, I have it on good reference we only need 'yum install bind'. Bind-libs comes along as a dependency, and the rest is optional.

    Your RHCE notes are a great contribution and I've referred to them often as I get closer to my RHCE goal. Best wishes on your studies!

  • October 5, 2011 at 3:06 am

    I made a mistake in the above post. The minimal process:
    yum install bind bind-libs
    (bind-libs should be installed automatically as dependency)
    edit /etc/named.conf with the changes you outlined, plus change dnssec-validation to no.
    chkconfig named on
    service named restart
    Your process works fine, just a few extra steps!
    Thanks much again. My apologies for any confusion.

Leave a Reply