RHEL6 Caching Name Server

The package caching-nameserver is integrated in the bind package!

So these two packages have to be installed:

# yum install bind bind-chroot

Than set named_write_master_zones 1

# setsebool -P named_write_master_zones 1

Allow queries on port 53 for DNS requests

# iptables -A INPUT -m state –state NEW -m tcp -p tcp –dport 53 -j ACCEPT
# iptables -A INPUT -m state –state NEW -m udp -p udp –dport 53 -j ACCEPT

open /etc/named.conf and add

options {
#listen-on port 53 { 127.0.0.1; any; }; (can be commented if there is no firewall between me and the DNS Server im  talking to)
#listen-on-v6 port 53 { ::1; }; (can be commented if there is no firewall between me and the DNS Server im  talking to)
directory       “/var/named”;
dump-file       “/var/named/data/cache_dump.db”;
statistics-file “/var/named/data/named_stats.txt”;
memstatistics-file “/var/named/data/named_mem_stats.txt”;
query-source    port 53;
query-source-v6 port 53;

allow-query     { localhost; any; };
recursion yes;
forwarders      { 192.168.1.1; };
forward only;

dnssec-enable no; (Disable DNSSEC)
dnssec-validation no; (Disable DNSSEC)

dnssec-lookaside auto;

Open /etc/resolve.conf

change your nameserver to 127.0.0.1

Restart named

#service named restart