yum install bind bind-utils cat /etc/named.conf # forwarding reverse lookup zone "==============>internal reverse lookup IP range<================55.100.in-addr.arpa" in { type forward; forwarders { ==================================>internal DNS IPs<====================================; }; }; zone "==================================>internal domain<====================================" in { type forward; forwarders { ==================================>internal DNS IPs<====================================; }; }; options { directory "/var/named"; # Hide version string for security version "not currently available"; # Listen to the loopback device only listen-on { any; }; listen-on-v6 { ::1; }; # Do not query from the specified source port range # (Adjust depending your firewall configuration) avoid-v4-udp-ports { range 1 32767; }; avoid-v6-udp-ports { range 1 32767; }; # Forward all DNS queries to the public DNS. forwarders { ==================================>public DNS IP<====================================; }; forward only; # Expire negative answer ASAP. # i.e. Do not cache DNS query failure. max-ncache-ttl 1200; # 3 seconds # Disable non-relevant operations allow-transfer { none; }; allow-update-forwarding { none; }; allow-notify { none; }; allow-recursion { any; }; }; service named start
To setup the client config you can then change the nameserver and point to your new forwarding DNS.
PS: do not forget that your nameserver also should be able to resolve through the named and you should set your /etc/resolv.conf nameserver 127.0.0.1.