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 "server.com" that should contain 2 nameservers: ns1.server.com and ns2.server.com. 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/named.run";
        severity dynamic;

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

    zone "server.com" IN {
        type master;
        file "/var/named/server.com.db";

file "/var/named/server.com.db"

$TTL 14400 
server.com. IN  SOA ns1.server.com. mail.server.com. (
            20M )

server.com. IN  A

www.server.com. IN  CNAME   server.com

ns1.server.com. IN  A
ns2.server.com. IN  A

server.com. IN  NS  ns1.server.com.

server.com. IN  NS  ns2.server.com.

mail.server.com   IN    MX     1 server.com.

ftp.server.com. IN  A
mail.server.com.    IN  A

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

file /etc/resolv.conf

search server.com

dig and nslookup to ns1 or ns1.server.com give SERVFAIL.

What is wrong with this?

Thank you

  • 1
    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

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 (server.com) 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.

  • 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/named.pid': Permission denied 10-May-2013 07:01:27.406 unlink '/var/run/named/named.pid': 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 clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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