Home

Debian/Ubuntu Tips & Tricks

Debuntu.org: .deb packages, Unix/Linux Tutorials and Articles.

Sponsors




Tips


Google Products


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

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.


Can you elaborate ?

Great guide and tutorial. I suspect i understand some of the concepts but i'm not all clear on how to get machines to register with the nameserver. I'm not a DNS expert but i grasp the concept of DNS. If i read your entry correctly you map each macine in the text-file for reverse lookup.

What i would like to know is if there is a way to automatically register the macines by their name in the domain (for the 192.168.1.x network)....or will this setup do just that and the values are only for the fixed ip adresses/servers in the network???

br//duhd


dnsmasq and zeroconf

Hi,

DNS server were primarily used to give a human readable name to machine over the internet or in big local networks.
Bind is definitely not the piece of software you want to use in a Home LAN.

A better bet would be to look at DnsMasq, it is an easy to configure alternative to Bind.

What i would like to know is if there is a way to automatically register the macines by their name in the domain (for the 192.168.1.x network)....or will this setup do just that and the values are only for the fixed ip adresses/servers in the network???

I think this sounds like ZeroConf.
Debuntu