Free Hosting Online for WorkStations

< Previous | Contents | Next >

2.3.2. Reverse Zone File


Now that the zone is setup and resolving names to IP Adresses a Reverse zone is also required. A Reverse zone allows DNS to resolve an address to a name.


Edit /etc/bind/named.conf.local and add the following:


zone "1.168.192.in-addr.arpa" { type master;

file "/etc/bind/db.192";

};


Replace 1.168.192 with the first three octets of whatever network you are using. Also, name the zone file /etc/bind/db.192 appropriately. It should match the first octet of your network.


Now create the /etc/bind/db.192 file:


sudo cp /etc/bind/db.127 /etc/bind/db.192


Next edit /etc/bind/db.192 changing the basically the same options as /etc/bind/db.example.com:


;

; BIND reverse data file for local 192.168.1.XXX net

;

$TTL 604800

@ IN SOA ns.example.com. root.example.com. (

2 ; Serial

604800 ; Refresh

86400 ; Retry

2419200 ; Expire

604800 ) ; Negative Cache TTL

;



@

IN

NS

ns.

10

IN

PTR

ns.example.com.


The Serial Number in the Reverse zone needs to be incremented on each change as well. For each A record you configure in /etc/bind/db.example.com, that is for a different address, you need to create a PTR record in /etc/bind/db.192.


After creating the reverse zone file restart BIND9:


sudo systemctl restart bind9.service


Top OS Cloud Computing at OnWorks: