Reverse lookup SERVFAIL

Posted by Quan Tran on Server Fault See other posts from Server Fault or by Quan Tran
Published on 2014-06-02T07:18:59Z Indexed on 2014/06/02 9:31 UTC
Read the original article Hit count: 378

Filed under:
|
|
|

I just set up a DNS server and a web server using Virtualbox. The IP address of the DNS server is 192.168.56.101 and the web server 192.168.56.102.

Here are my configuration files for the DNS server:

named.conf:

//
// named.conf
//
// Provided by Red Hat bind package to configure the ISC BIND named(8) DNS
// server as a caching only nameserver (as a localhost DNS resolver only).
//
// See /usr/share/doc/bind*/sample/ for example named configuration files.
//

options {
    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";
    //query-source address * port 53;

    //forward first;
    forwarders { 8.8.8.8; 8.8.4.4; };

    listen-on port 53 { 127.0.0.1; 192.168.56.0/24; };
    allow-query { localhost; 192.168.56.0/24; };
    recursion yes;

    dnssec-enable yes;
    dnssec-validation yes;
    dnssec-lookaside auto;

    /* Path to ISC DLV key */
    bindkeys-file "/etc/named.iscdlv.key";

    managed-keys-directory "/var/named/dynamic";
};

logging {
        channel default_debug {
                file "data/named.run";
                severity debug 10;
                print-category yes;
                print-time yes;
                print-severity yes;
            };
};

zone "quantran.com" in {
    type master;
    file "named.quantran.com";
};

zone "56.168.192.in-addr.arpa" in {
    type master;
    file "named.192.168.56";
    allow-update { none; };
};

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

named.quantran.com:

$TTL 86400
quantran.com.       IN SOA  dns1.quantran.com. root.quantran.com. (
                        100     ; serial
                        3600    ; refresh
                        600     ; retry
                        604800  ; expire
                        86400 )
                    IN NS       dns1.quantran.com.
dns1.quantran.com.  IN A        192.168.56.101
www.quantran.com.   IN A        192.168.56.102

named.192.168.56:

$TTL 86400
$ORIGIN 56.168.192.in-addr.arpa.
@                               IN SOA  dns1.quantran.com. root.quantran.com. (
                                    100     ; serial
                                    3600    ; refresh
                                    600     ; retry
                                    604800  ; expire
                                    86400 ) ; minimum
                                IN NS   dns1.quantran.com.
101.56.168.192.in-addr.arpa.    IN PTR  dns1.quantran.com.
102                             IN PTR  www.quantran.com.

When I try a normal lookup from the host (I configured so that the only nameserver the host uses is the DNS server 192.168.56.101):

quan@quantran:~$ host www.quantran.com
www.quantran.com has address 192.168.56.102
quan@quantran:~$ host dns1.quantran.com
dns1.quantran.com has address 192.168.56.101

But when I try a reverse lookup:

quan@quantran:~$ host -v 192.168.56.101 192.168.56.101
Trying "101.56.168.192.in-addr.arpa"
Using domain server:
Name: 192.168.56.101
Address: 192.168.56.101#53
Aliases: 

Host 101.56.168.192.in-addr.arpa not found: 2(SERVFAIL)
Received 45 bytes from 192.168.56.101#53 in 0 ms

quan@quantran:~$ host -v 192.168.56.102 192.168.56.101
Trying "102.56.168.192.in-addr.arpa"
Using domain server:
Name: 192.168.56.101
Address: 192.168.56.101#53
Aliases: 

Host 102.56.168.192.in-addr.arpa not found: 2(SERVFAIL)
Received 45 bytes from 192.168.56.101#53 in 0 ms

So why can't I perform a reverse lookup? Anything wrong with the zone configuration files?

Thanks in advance :)

Oh, here is the output from the log file /var/named/data/named.run when I perform the reverse lookup:

quan@quantran:~$ host 192.168.56.102 192.168.56.101
Using domain server:
Name: 192.168.56.101
Address: 192.168.56.101#53
Aliases: 

Host 102.56.168.192.in-addr.arpa not found: 2(SERVFAIL)

/var/named/data/named.run:

02-Jun-2014 15:18:11.950 client: debug 3: client 192.168.56.1#51786: UDP request
02-Jun-2014 15:18:11.950 client: debug 5: client 192.168.56.1#51786: using view '_default'
02-Jun-2014 15:18:11.950 security: debug 3: client 192.168.56.1#51786: request is not signed
02-Jun-2014 15:18:11.950 security: debug 3: client 192.168.56.1#51786: recursion available
02-Jun-2014 15:18:11.950 client: debug 3: client 192.168.56.1#51786: query
02-Jun-2014 15:18:11.950 client: debug 10: client 192.168.56.1#51786: ns_client_attach: ref = 1
02-Jun-2014 15:18:11.950 query-errors: debug 1: client 192.168.56.1#51786: query failed (SERVFAIL) for 102.56.168.192.in-addr.arpa/IN/PTR at query.c:5428
02-Jun-2014 15:18:11.950 client: debug 3: client 192.168.56.1#51786: error
02-Jun-2014 15:18:11.950 client: debug 3: client 192.168.56.1#51786: send
02-Jun-2014 15:18:11.950 client: debug 3: client 192.168.56.1#51786: sendto
02-Jun-2014 15:18:11.951 client: debug 3: client 192.168.56.1#51786: senddone
02-Jun-2014 15:18:11.951 client: debug 3: client 192.168.56.1#51786: next
02-Jun-2014 15:18:11.951 client: debug 10: client 192.168.56.1#51786: ns_client_detach: ref = 0
02-Jun-2014 15:18:11.951 client: debug 3: client 192.168.56.1#51786: endrequest

02-Jun-2014 15:18:11.951 client: debug 3: client @0xb537e008: udprecv

Also, I made some changes to the log section in named.conf.

© Server Fault or respective owner

Related posts about dns

Related posts about bind