3

So I'm trying to set up reverse DNS for an IPv6 address using BIND9, and I'm having a little trouble getting it to work.

Assume I have 2001:41D0:2:D447::/64 assigned to my server and I want 2001:41d0:2:d447:0:0:0:ddc0 to resolve to just.an.example.com

I have the following in named.conf.local

zone "example.com" {
    type master;
    file "/etc/bind/example.com";
};
zone "7.4.4.d.2.0.0.0.0.d.1.4.1.0.0.2.ip6.arpa" {
       type master;
       file "/etc/bind/2001:41d0:2:d447::.rdns";
};

In example.com I have the line

just.an.example.com.   IN  AAAA    2001:41d0:2:d447:0:0:0:ddc0

which appears to work fine.

In 2001:41d0:2:d447::.rdns I have

$TTL 1h

@       IN      SOA     ns1.example.com.  admin.example.com. (
        2014103002      ; serial
        1h              ; slave refresh interval
        15m             ; slave retry interval
        1w              ; slave copy expire time
        1h              ; NXDOMAIN cache time
        )

@       IN      NS      ns1.example.com.

0.c.d.d.0.0.0.0.0.0.0.0.0.0.0.0    IN    PTR    just.an.example.com.

and this doesn't appear to work. I think I'm messing up one of the IPv6 addresses in either the PTR line or the zone line in named.conf.local.

Does anyone spot anything wrong syntax wise?

  • LGTM. Must be a problem with the delegation or else not querying the right server? – Celada Oct 30 '14 at 22:32
5

I test with a command like:

 host 2001:41d0:2:d447:0:0:0:ddc0 localhost  

This looks good, but your default acl may prevent access. Try adding allow-query { any; }; to the zone definition. You may also want to enable zone transfers

If you enable zone transfers you can test with a command like:

 host -t axfr 2.2.b.0.1.1.f.1.0.7.4.0.1.0.0.2.ip6.arpa localhost

Try checking the zone file and configuration.

named-checkzone -i full 7.4.4.d.2.0.0.0.0.d.1.4.1.0.0.2.ip6.arpa /etc/bind/2001:41d0:2:d447::.rdns
named-checkconf -z 

Reload bind and check the logs for errors. If you still have issues, try enabling logging.

logging {
    channel security_file {
            file "/var/log/named/security.log" versions 10 size 10k;
            severity dynamic;
            print-time yes;
    };
    channel simple_log {
            file "/var/log/named/bind.log" versions 10 size 50k;
            severity warning;
            print-time yes;
            print-severity yes;
            print-category yes;
    };
    channel query_log {
            file "/var/log/named/query.log" versions 10 size 1m;
            severity info;
            print-time yes;
    };

};
  • Hey, I've given your suggestions a try and I still can't manage to get it working. host 2001:41d0:2:d447:0:0:0:ddc0 localhost returns 0.c.d.d.0.0.0.0.0.0.0.0.0.0.0.0.7.4.4.d.2.0.0.0.0.d.1.4.1.0.0.2.ip6.arpa domain name pointer just.an.example.com. named-checkzone -i full 7.4.4.d.2.0.0.0.0.d.1.4.1.0.0.2.ip6.arpa /etc/bind/2001:41d0:2:d447::.rdns returns zone 7.4.4.d.2.0.0.0.0.d.1.4.1.0.0.2.ip6.arpa/IN: loaded serial 2014103002 No errors other than the occasional error (chase DS servers) resolving '185.in-addr.arpa/DS/IN': 8.8.8.8#53 host -t axfr returns all the record – Shilgen Oct 31 '14 at 21:26
  • @Shilgen The host lookup shows that the PTR lookup is working. That is the expected output. What do you think is not working? – BillThor Nov 4 '14 at 1:43
  • I've actually found that it's an issue with my server host, so I guess I'll have to talk to them about it. Thanks for the help - I'm going to mark your answer as correct as it helped me confirm the configuration was okay. Cheers! – Shilgen Nov 6 '14 at 23:00

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.