Setting up a Name Server for IPv6 rDNS in CentOS

Managing your own IPv6 rDNS is a fairly simple task. After setting up the name server, please open a ticket with support to request that the block is delegated to the name servers setup in this article.
In this guide we will show you how to set up a master only and master and slave system for rDNS.
Start with setting up a master and slave server first:
1. Log into the your dedicated server as root (or another user with full root privilages).
2. Install bind and bind-utils by executing yum install bind bind-utils from within the console.
3. Back up of the default configuration file by executing cp /etc/named.conf /etc/named.bak within the console.
4. Edit the configuration file by executing vim /etc/named.conf within the console. Below the sample of modified file.
// named.conf
// Provided by Red Hat bind package to configure the ISC BIND named(8) DNS
// server as a caching only nameserver (as a localhost DNS resolver only).
// See /usr/share/doc/bind*/sample/ for example named configuration files.
options {
        listen-on port 53 { any; };
        listen-on-v6 port 53 { none; };
        directory       "/var/named";
        dump-file       "/var/named/data/cache_dump.db";
        statistics-file "/var/named/data/named_stats.txt";
        memstatistics-file "/var/named/data/named_mem_stats.txt";
        allow-query     { localhost; any; };
        allow-transfer { none; }; 
        recursion no; 
        dnssec-enable yes;
        dnssec-validation yes;
        dnssec-lookaside auto;
        /* Path to ISC DLV key */
        bindkeys-file "/etc/named.iscdlv.key";
        managed-keys-directory "/var/named/dynamic";
logging {
        channel default_debug {
                file "data/";
                severity dynamic;

zone "." IN {
        type hint;
        file "";
include "/etc/named.rfc1912.zones";
include "/etc/named.root.key";

//This bellow will be our rDNS zone.
zone "" IN {
type master;
file "";
allow-update { none; };
allow-transfer {; };
notify yes;
also-notify {; };
*Notes: The Lines "listen-on port 53 { any; };" and "listen-on-v6 port 53 { none; };" can be set to listen on a specific IP address configured on the server i.e.; or; etc.
The line zone "" is your /64 IPv6 block in reverse. In this example it represents IPv6 IP block 2605:9880:AAAA.BBBB. 
The IPv6 block assigned by default will be a /64. To encode IPv6 block 2605:9880:0:1 for example, each segment will need to be 4 characters long to take 2605:9880:0:1 and make each segment 4 characters long by adding zeros in front of the front like so 2605:9880:0000:0001. If the IPv6 block is 2605:9880:0:12 then the same rule applies to have 2605:9880:0000:0012.
Now we take 2605:9880:0000:0012 and enter it backwards adding a '.' after each value to have and append it with '' so you know have the rDNS zone for block  2605:9880:0:12 =
'Type' will be set as master as it is the main nameserver.
The 'file' specified here will contain our PTR entries.
The 'allow-transfer' line will allow to transfer settings from the master to a slave if applicable.
If you plan to have only one name server with no master, this line and 'also-notify' can be ignored.
To add a zone record for IPv6 rDNS. Type in the following command: vim /var/named/
The actual zone record Zone Record:
$TTL 1h ; Default TTL
@       IN      SOA (
        1234567890      ; serial
        1h              ; slave refresh interval
        15m             ; slave retry interval
        1w              ; slave copy expire time
        1h              ; NXDOMAIN cache time
; domain name servers
@       IN      NS
@       IN      NS
dns1            IN      A     
dns2            IN      A     
; IPv6 PTR entries    IN    PTR    IN    PTR
replace with the master IP and with the slave name server IP.
In this zone file you will see IPs in reverse arpa format. These are part of the PTR records.
To add a record, just put them in reverse arpa format like we did earlier in the config file and append "IN    PTR    domainname" is a useful tool to help create the zone file.
Once created, this zone file needs to be copied to slave name server under the same directory, /var/named in this case.
The serial number will be important as it will be used to update the entries on both servers.
To configure the slave server:
The reset of the setting will be the same but the rDNS zone will be different.
zone "" IN {
type slave;
masters {; };
file "";
allow-transfer {; };
notify yes;
Change the IP of the master server and "" to the reverse IP used in the master config.
Once completed, save and start the service on both the master and the slave server by executing service named start within the console.
On one of the server you may test the server by executing nslookup ipv6add
Replace the "ipv6add" with the ipaddress that you added a PTR report and 1.1.1 to the master server IP, then you can execute the same command but with the slave server IP to make sure it works.
To update the zone file:
Open the zone file on the master server and add the and extra line and add the PTR record.
Once added you will need to increment the serial by 1 digit and save.
Once the PTR record has been saved and the serial incremented, execute rdnc reload within the console. This will will update the master and slave server of the added or removed PTR records.
Additional notes:
You can also just have master server. Below is a zone entry in /etc/named.conf for a master only server:
zone "" IN {
type master;
file "";
allow-update { none; };
allow-transfer { none; };
notify yes;
also-notify {none; };

Add Feedback