One implementation of IPv6 reverse DNS server

Kazunori Fujiwara, JPRS


Most of Japanese ISPs offer IPv4 reverse DNS for customer's IP addresses which are assigned dinamically. They are considering that they should offer IPv6 reverse DNS server for their customers. But how to implement?

Each IPv6 address and hostname which is written in PTR RR must have one to one mapping.
Consider hostname as 32-character hexadecimal representation of IPv6 address (without :) with fixed domain name suffix.
If an authoritative server receives PTR lookup, it generates corresponding hostname and answers it. And more, the generated hostname should be resolved by forward lookup. It is easy to implement because the generated hostname contains raw IPv6 address.
For example,
Suppose domainname suffix =
IPv6 address of the query = 2001:db8::1
Input query =
Then the server generates, IN PTR
Forward lookup will return: IN AAAA 2001:db8::1
And more, consider zone cut's NS RR and SOA RR.

Zone cut & other RRs
8.b.d. IN NS, SOA IN NS, SOA

I implemented this DNS server using perl Net::DNS::Nameserver package as 1 hour work.

My first implementation is

DNSSEC support for IPv6 reverse DNS server

Source code: which supports multiple reverse zones.
Source code: which does not supports multiple reverse zones.
Wrapper script for v6rev: run-v6rev
Requires: Perl 5.8, 5.10 with Net::DNS::SEC.
It requires configration file.
It generates signs for each DNS query.

I run this package in my company's research network.
IPv6 address is 2001:200:132:6::/64
Hostname suffix is
My configuration is v6rev.conf
You can check our serves response using dig command.
   dig -x 2001:200:132:6::1 +dnssec

Written by Kazunori Fujiwara, JPRS