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

I can't properly resolve my reverse name. In my configs, I replaced my IP address by X1.X2.X3.X4, and my domain name by domainname. I have been following this tutorial, in which it first resolves the inverse before continue configuring.

I'm stuck in such a way that I don't know how to continue. One thing that I noticed is that he is using a local IP, and I'm using a internet IP.

Any pointers on how to debug this thing would be appreciated.

Here is my /etc/bind/named.conf.local:

logging {
    channel query.log {      
        file "/var/log/query.log"; 
        severity debug 3; 
    }; 
    category queries { query.log; }; 
};

zone "X3.X2.X1.in-addr.arpa" {
    type master;
    file "zones/ptr/X3.X2.X1.db";
};

include "/etc/bind/zones.rfc1918";

And my "/etc/bind/zones/ptr/X3.X2.X1.db";

$TTL 3D
@   IN      SOA     ns.domainname.com. admin.domainame.com. (
                1       ; Serial
                8H      ; Refresh
                2H      ; Retry
                4W      ; Expire
                1D)     ; Minimum TTL

        NS      ns.domainname.com.
49          PTR     localhost.

This is the dig output, note how it is missing the answer section.

root@hostname:/etc/bind# dig -x X1.X2.X3.X4 @localhost

; <<>> DiG 9.8.1-P1 <<>> -x X1.X2.X3.X4 @localhost
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 47451
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;X4.X3.X2.X1.in-addr.arpa.  IN  PTR

;; Query time: 0 msec
;; SERVER: ::1#53(::1)
;; WHEN: Thu Mar 27 18:26:06 2014
;; MSG SIZE  rcvd: 44

On the query.log, I have the following:

client ::1#49304: query: X4.X3.X2.X1.in-addr.arpa IN PTR + (::1)
share|improve this question
    
You got a SERVFAIL, which probably means there's something useful in one of bind's logs. Could you find it and add it to your question? –  Flup Mar 27 at 14:37
    
@fotanus Did you restart named? Please provide log output as well, –  alexus Mar 27 at 14:38
    
@Flup I'm using ubuntu 12.04 and nothing poped up on syslog - where can I find the bind log? greping by zone on /var/log only returns daemon and syslog –  fotanus Mar 27 at 14:41
    
Look for a logging section in your named.conf (or named.conf.local) or, failing that, try in /var/log/named. –  Flup Mar 27 at 14:43
    
@Flup I edited the question adding how I add the log on named.conf.local, and the output on the log file –  fotanus Mar 27 at 14:55

2 Answers 2

The problem on my case is that I couldn't have a relative path on named.conf.local. I needed to be a full path.

So changing

file "zones/ptr/X3.X2.X1.db";

By

file "/etc/bind/zones/ptr/X3.X2.X1.db";

Make it work.

Special thanks to @WumpusQ.Wumbley comment, which make me look on syslogd and see the error message that my file was not found.

share|improve this answer
1  
Relative paths are legal, but they must be relative to the directory statement listed in the global options {}; block. (FYI: situations such as this are we encourage posting the full configuration, not the most relevant snippets) –  Andrew B Mar 27 at 21:26
    
@AndrewB That was actually my full named.conf.local, the other files (including the one that is included on it) are standard ubuntu ones. Thanks for the pointer about the correct option! –  fotanus Mar 27 at 21:54
    
Which is fine, until you factor in that we're not askubuntu. :) We've got a number of DNS experts here, but you're limiting yourself to a fraction of the exposure by omitting a stock distro config. –  Andrew B Mar 27 at 21:56
    
@AndrewB You are right, sorry for posting in the wrong place. As you can see, I use mainly stackoverflow. Please feel free to move to askubuntu if you, that uses this SE site way more than me, feel like the right thing. –  fotanus Mar 28 at 2:16
    
Oh, no, I'm not saying that at all. It was fine for SF, but if you're gonna use SF, you can't make the same assumptions as that site. :) –  Andrew B Mar 28 at 2:17

First,

named-checkconf /etc/named.conf

Then, if that passes, restart named.

Do a dig -x X1.X2.X3.X4 @localhost

share|improve this answer
    
Hello, thanks for the answer. I don't have a /etc/named.conf file. Running it on /etc/bind/named.conf and it don't find problems. Restarting the server and running the dig returns what I wrote on my question. –  fotanus Mar 27 at 14:57

Your Answer

 
discard

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.