Random Linux Garble.

Configure a Caching-only Name Server to Forward DNS Queries

To pass the RHCE one of the things that Red Hat wants you to setup is a caching-only name server. This is actually pretty easy with RHEL 6.

Install the bind package

sudo yum install bind

Then start the package and set it up to start on boot.

sudo /sbin/service named start && sudo /sbin/chkconfig named on

You have successfully setup the caching-only name server, for real. Now to get it to forward queries to a specific name server.

For me I just forwarded the queries to my local nameserver, the router on To do this you edit named.conf

sudo vim /etc/named.conf

In the options section I added:

listen-on port 53  {;;};

;which is the ip for the bind dns server)

allow-query  { localhost;;};

; adding the ip block for localhost)

forward only;  
forwarders {;};

This tells our bind server that I want to forward all dns queries to my router. I could also, for example, forward all queries to my ISP’s nameservers. In this case the ip would be (

forwarders {;};

Thats all there is to that requirement for the Red Hat Certified Engineer exam.