How-To: Setting up a DNS zone with Bind9 — page 2
3. Setting up Reverse Name Resolution
In order to be able to get the name of the machine located at IP 192.168.1.X, we need to set up a reverse name zone which is going to be call, in this example 1.168.192.in-addr.arpa,
edit /etc/bind/named.conf.local
and add:
zone “1.168.192.in-addr.arpa” {
type master;
notify no;
file "reverse/192.168.1";
};
This time, wa are going to write the information for reverse dns in a specific directory (“reverse”). Create that directory and edit the zone file:
mkdir /var/cache/bind/reverse
vi /var/cache/bind/reverse/192.168.1
and copy the following lines:
$TTL 3D
@ IN SOA ns.debuntu.foo. chantra.debuntu.foo (
200608051 ; Serial, todays date + todays serial
8H ; Refresh
2H ; Retry
4W ; Expire
1D) ; Minimum TTL
NS ns.debuntu.foo
1 PTR gw.debuntu.foo.
2 PTR mail.debuntu.foo.
3 PTR otherbox.debuntu.foo.
5 PTR ns.debuntu.foo.
now, doing a nslookup
on 192.168.1.2 will return mail.debuntu.foo.