• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 971
  • Last Modified:

Setting up a Caching Only DNS Server on CentOS 5.5

We have the need to set up a CentOS 5.5 server to act as a DNS Caching server to do lookups.  This server will not provide any zone hosting.  It is simply so that we do not have to rely on our ISPs DNS servers for our client systems.   We would however want to make sure that only that clients within our IP ranges are allowed to use the server for DNS lookups.

Does anyone have an easy HowTo?  I have searched and foudn some references but I just cant seem to get things working in the most basic of scenarios.
  • 2
2 Solutions
Seth SimmonsSr. Systems AdministratorCommented:

You could write iptables rules for allowing only certain hosts on udp 53
BladesAwayAuthor Commented:
That breings me right back to one of the issues that I was having, which is the mixxing named.rfc1912.zones file.  I was able to find that in the /usr/share/doc/bind-9.3.6/sample/etc/ and I moved it to /var/named/chroot/etc.  They when I start named I get what is displayed below.  I guess I could just locate and copy each of these files but I'm pretty sure I tried that last night and just got deeper into the weeds.

[root@centos etc]# service named start
Starting named:
Error in named configuration:
zone localdomain/IN: loading master file localdomain.zone: file not found
_default/localdomain/IN: file not found
zone localhost/IN: loading master file localhost.zone: file not found
_default/localhost/IN: file not found
zone 0.0.127.in-addr.arpa/IN: loading master file named.local: file not found
_default/0.0.127.in-addr.arpa/IN: file not found
zone loading master file named.ip6.local: file not found
_default/ file not found
zone 255.in-addr.arpa/IN: loading master file named.broadcast: file not found
_default/255.in-addr.arpa/IN: file not found
zone 0.in-addr.arpa/IN: loading master file named.zero: file not found
_default/0.in-addr.arpa/IN: file not found
post the named.conf
In chrooted setup which is what you seems to have the files should be in /var/name/chroot/var/named/.

The link http:#33678425 resolves/provides a user a guide to setup a caching DNS.

The user seems to have added entries to /etc/named.conf but did not create the corresponding zone files nor responded to my followup to see whether the asker somehow altered where named would be looking for these files.

Featured Post

Learn to develop an Android App

Want to increase your earning potential in 2018? Pad your resume with app building experience. Learn how with this hands-on course.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now