A caching only DNS server caches DNS query results for the domain name being queried. These chache are stored for pre specified time known as the TTL ( time-to-live). A caching only name server will find the answer to name queries and remember the answer the next time you need it. This will shorten the waiting time the next time significantly, especially if you’re on a slow connection.
Step 1: Install the BIND Packages using Yum
Install bind packages using below command. In CentOS the caching-nameserver package has been included with bind package.
# yum install bind bind-chroot
Step 2: Copy default bind configuration File
Copy bind configuration file from bind sample files using below command. Change the path of files as per version you have installed.
cd /var/named/chroot/etc cp /usr/share/doc/bind-9.9.2/sample/etc/named.conf . cp /usr/share/doc/bind-9.9.2/sample/etc/named.rfc1912.zones .
Step 3: Make changes in Configuration File
Edit bind configuration file in your favorite editor and make necessory changes as per below settings or use below configuration.
// /var/named/chroot/etc/named.conf options { listen-on port 53 { 127.0.0.1; any; }; listen-on-v6 port 53 { ::1; }; Continue reading "Caching Name Server for CentOS 6.x"