RHEL7: Configure a caching-only name server.
Note: This is an RHCE 7 exam objective.
Presentation of Caching-only Name Server
A cache-only name server keeps a cache of all the results of the previous requests to the root DNS servers.
Configuration Procedure
Install the bind package:
# yum install -y bind
Edit the /etc/named.conf file and change the listen-on option from 127.0.0.1 to any:
listen-on port 53 { any; };
In the same file, change the allow-query option from localhost to any:
allow-query { any; };
In the same file, disable the dnssec-validation option:
dnssec-validation no;
Check the configuration file:
# named-checkconf
Add a new service to the firewall:
# firewall-cmd --permanent --add-service=dns
success
Reload the firewall configuration:
# firewall-cmd --reload
success
Activate the DNS service:
# systemctl enable named
Start the DNS service:
# systemctl start named
Time to Test
Check the configuration:
# nslookup cnn.com 127.0.0.1
# dig @127.0.0.1 cnn.com
Additional Resources
You can also read this nice article from Zytrax.com about the different DNS Configuration Types. If you want to go any further, check the master DNS server tutorial.
Leave a comment