Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I've been trying to setup my Zones files in Bind9 and I'm having some issues with the reverse zone lookup.

My nameserver is running a Query Refused when I attempt to perform a lookup on the IP. Should it not return the domain I specified?

My Lookups:

C:\Users\Chuck>nslookup test.com [serverIP]
Server:  UnKnown
Address:  [serverIP]

Name:    test.com
Address:  1.2.3.4

C:\Users\Chuck>nslookup 1.2.3.4 serverIP]
Server:  UnKnown
Address:  serverIP]

*** UnKnown can't find 1.2.3.4: Query refused

My Config:

[user@host zones]$ cat /etc/bind/named.conf.local
zone "test.com" {
        type master;
        file "/etc/bind/zones/test.com.db";
};

zone "4.3.2-in-addr.arpa" {
        type master;
        file "/etc/bind/zones/rev.4.3.2.in-addr.arpa";
};

[user@host zones]$ cat test.com.db
$TTL    604800
@       IN      SOA     ns1.myhost.net. admin.test.com. (
        2006081401      ; Serial
        7200            ; Refresh
        120             ; Retry
        2419200         ; Expire
        604800          ; Default TTL
)

@       IN      NS      ns1.myhost.net.

test.com.         IN      A       1.2.3.4
www               IN      A       1.2.3.4

[user@host zones]$ cat rev.4.3.2.in-addr.arpa
$TTL 1d;
$ORIGIN 4.3.2.IN-ADDR.ARPA.
@       IN      SOA     ns1.myhost.net. admin.test.com. (
        2006081401      ; Serial
        7200            ; Refresh
        120             ; Retry
        2419200         ; Expire
        604800          ; Default TTL
)

   IN NS    ns1.myhost.net.
1  IN PTR   test.com.
share|improve this question

2 Answers 2

Your zone is wrong. 4.3.2.IN-ADDR.ARPA. is the reverse zone for 2.3.4.x network.

share|improve this answer

Also: watch for the naming of your zones.

zone "4.3.2-in-addr.arpa" {
        type master;
        file "/etc/bind/zones/rev.4.3.2.in-addr.arpa";
};

is probably not what you really want. The zone name should be "4.3.2.in-addr.arpa" (dot instead of dash). Use named-checkconf -z to check all your zone files before loading them.

So the proper zone name should 3.2.1.in-addr.arpa, and the entry for test.com should be

4       IN PTR test.com.
share|improve this answer

Your Answer

 
discard

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