Sunday, December 6, 2009

IPv6 PTR Record configuration in BIND

My environment: RedHat Fedora Core 12 x86_64

BIND version: bind-9.6.1-11.P1.fc12.x86_64

Let’s see an example how to configure IPv6 reverse lookup record in BIND.

Forward Lookup:

www   AAAA   2001:123:45:678:20c:29ff:fe6a:7f93

It just like normal IPv4 host record, except it is a “AAAA” record instead of an “A” record.

Reverse Lookup zone configuration in named.conf:

zone "" {
        type master;
        file "2001.123.45.678-db";

The name of the zone is the reverse of the /64 prefix 2001:123:45:678::/64

In the reverse lookup zone file, the PTR record is:

3.9.f.7.a.6.e.f.f.f.9.2.c.0.2.0   IN   PTR   www

The PTR record is the reverse of the host portion of the IPv6 address.

Try a dig -x 2001:123:45:678:20c:29ff:fe6a:7f93 and see if the BIND server replies with the reverse lookup record correctly.

No comments: