Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have bind configured (sort of) on CentOS 6 as a forward-only DNS server, like so:

options {
    listen-on port 53 {; };
    directory "/var/named";
    recursion yes;
    allow-recursion { localhost; };
    forward only;
    forwarders {;; };

include "/etc/named.rfc1912.zones";

The problem is, that it seems it's not doing any forwarding:

$ dig

; <<>> DiG 9.7.3-P3-RedHat-9.7.3-8.P3.el6_2.2 <<>>
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 1037
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0

;                    IN      A

;; Query time: 555 msec
;; WHEN: Fri Jan 27 13:30:52 2012
;; MSG SIZE  rcvd: 32

I do not have bind-chroot installed on this server. I can confirm that my resolv.conf file is configured to use for DNS lookups. If I do dig @ then I get a correct response.

If I remove the forwarding statements and add the hint zone for the root servers, then it does correctly resolve names, but of course I don't want to be hitting the root servers for every lookup. Any suggestions?

share|improve this question
Try running dig +trace to confirm named is working correctly. – James O'Gorman Jan 27 '12 at 18:54
up vote 2 down vote accepted

I would suggest to add, beside localhost, the IP address of the machine itself:

allow-recursion {;;}

Of course, you need to replace with the real IP address you are using.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.