Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I'm having troubles configuring BIND with the reverse DNS being made by an external server in the hosting company.

Lets assume i have a domain "" that should contain 2 nameservers: and I want to use ip addresses and the DNS servers from the hosting company are: and

so the named.conf has:

options {
    empty-zones-enable no;
    listen-on port 53 { any; };
    listen-on-v6 port 53 { any; };
    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";

    forwarders {;; };
    allow-query {
    allow-transfer {;
    allow-recursion {; };

logging {
    channel default_debug {
        file "data/";
        severity dynamic;

view "external" {
    match-clients { any; };
    match-destinations { any; };

    zone "" IN {
        type master;
        file "/var/named/";

file "/var/named/"

$TTL 14400 IN  SOA (
            20M ) IN  A IN  CNAME IN  A IN  A IN  NS IN  NS   IN    MX     1 IN  A    IN  A

file /etc/hosts   localhost , localhost.localdomain , localhost4 , localhost4.localdomain4
::1 localhost , localhost.localdomain , localhost6 , localhost6.localdomain6 , ns1 , ns2

file /etc/resolv.conf


dig and nslookup to ns1 or give SERVFAIL.

What is wrong with this?

Thank you

share|improve this question
Please post the error logs from 1 or both the servers, they will explain why the server is not functioning. – NickW May 10 '13 at 10:00
Bet the 'view "external"' directive has something to do with. Try to remove it. – Alien Life Form May 10 '13 at 10:26

1 Answer 1

Your reverse DNS is a completely separate zone to your forward lookups; it doesn't matter that it's hosted on a different server.

The SERVFAIL is because something is wrong with your configuration for the forward zone ( or your bind config. I can't see anything obviously wrong with either. You'll need to examine the logs on the server-side. You might like to start bind with 'named -g' (in the foreground) to see the output while you test.

share|improve this answer
I have this errors, however folder and files permissions are 770 and owner/group named/named 10-May-2013 07:01:27.406 could not open file '/var/run/named/': Permission denied 10-May-2013 07:01:27.406 unlink '/var/run/named/': failed 10-May-2013 07:01:27.406 generating session key for dynamic DNS 10-May-2013 07:01:27.406 could not open file '/var/run/named/session.key': Permission denied 10-May-2013 07:01:27.406 could not create /var/run/named/session.key – Nitrate May 10 '13 at 11:02
Edit your original post to add that information; it is difficult to read in a comment. /var/run/named should be owned by named:named with permission 755. Are there existing files in that path? Are you using SELinux? Read-only file-system somehow? – fukawi2 May 12 '13 at 8:03

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.