How-To: Setting up a DNS zone with Bind9 — page 2

less than 1 minute read

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,

edit /etc/bind/named.conf.local and add:

zone “” {
    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 (
                        200608051 ; Serial, todays date + todays serial
                        8H      ; Refresh
                        2H      ; Retry
                        4W      ; Expire
                        1D)     ; Minimum TTL

1               PTR
2               PTR
3               PTR
5               PTR

now, doing a nslookup on will return