Wednesday, December 29, 2010

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 127.0.0.1; to any;
  • Change allow-query from localhost; to any;
  • Add forwarders { 1.2.3.4; 5.6.7.8; }; and forward only; to the options section
Restart dns - service named restart
Edit /etc/resolve.conf to use the local DNS server

2 comments:

Anonymous said...

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!

Anonymous said...

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
...done!
Your process works fine, just a few extra steps!
Thanks much again. My apologies for any confusion.