Debian/Ubuntu Tips and Tricks

Debuntu

Debian/Ubuntu Tips and Tricks

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

Posted by chantra on August 5th, 2006

This entry is part 2 of 2 in the series How-To: Setting up a DNS zone with Bind9

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.

Series Navigation<< How-To: Setting up a DNS zone with Bind9

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>