====== Writing Reverse Zone For IPv6 addresses ====== ===== Bind8/9 zonefile ===== **Example subnet** ; ; 2001:15c0:66e9::/48 ; $TTL 3d ; Default TTL (bind 8 needs this, bind 9 ignores it) $ORIGIN 9.e.6.6.0.c.5.1.1.0.0.2.ip6.arpa. @ IN SOA ns.xxxxx.tld. hostmaster.xxxxx.tld. ( 2009050120 ; Serial number (YYYYMMdd) 24h ; Refresh time 30m ; Retry time 1w ; Expire time 3d ; Default TTL (bind 8 ignores this, bind 9 needs it) ) ; Name server entries IN NS ns.xxxxx.tld. IN NS ns2.xxxxx.tld. IN TXT "2001:15c0:66e9::/48 Example IPv6 reverse" ; IPv6 PTR entries ; Subnet #1 $ORIGIN 1.0.0.0.9.e.6.6.0.c.5.1.1.0.0.2.ip6.arpa. 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0 IN PTR foobar.xxxx.tld. ; Subnet #2 $ORIGIN 0.0.0.0.9.e.6.6.0.c.5.1.1.0.0.2.ip6.arpa. 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0 IN PTR gw.xxxxxx.tld. zone "9.e.6.6.0.c.5.1.1.0.0.2.ip6.arpa" { notify yes; type master; file "/etc/bind/arpa/2001:15c0:66e9"; allow-update { none; }; allow-transfer {xxxx}; }; ===== PTR calculation ===== **Easy was for writting PTR records** * Using **ipv6calc** $ ipv6calc 2001:15c0:66e9::1 --out revnibbles.arpa No input type specified, try autodetection...found type: ipv6addr 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.9.e.6.6.0.c.5.1.1.0.0.2.ip6.arpa. * Using **perl** $ perl -e 'use Net::IP;$ip=new Net::IP("2a02:c0:100::2/128");print ($ip->reverse_ip()."\n");' 2.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.1.0.0.c.0.0.2.0.a.2.ip6.arpa. * Using **sipcalc** $ sipcalc -r 2a01:c08::14 -[ipv6 : 2a01:c08::14] - 0 [IPV6 DNS] Reverse DNS (ip6.arpa) - 4.1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.8.0.c.0.1.0.a.2.ip6.arpa.