DNS
Setting up BIND
Configuring Bind in Ubuntu/Debian
Install Bind
# apt-get install bind9
Ubuntu provides a pre-configured Bind, so we can edit /etc/bind/named.conf.local file instead of /etc/bind/named.conf
# cat /etc/bind/named.conf.local
zone "gene.com" {
type master;
file "/etc/bind/zones/sys-admin.net.db";
};
zone "0.168.192.in-addr.arpa" {
type master;
file "/etc/bind/zones/db.192.168.0";
};
Create the zone file for sys-admin.net
@ IN SOA ubuntu.sys-admin.net. root.ubuntu.sys-admin.net. (
2007030701
28800
3600
604800
38400
)
IN NS ubuntu.sys-admin.net.
IN MX 10 ubuntu.sys-admin.net.
ubuntu IN A 192.168.0.2
dt IN A 192.168.0.3
lt IN A 192.168.0.1
Now, create the reverse lookup file
@ IN SOA ubuntu.sys-admin.net. root.ubuntu.sys-admin.net. (
2007030701
28800
3600
604800
38400
)
IN NS ubuntu.sys-admin.net.
IN NS ns1.sys-admin.net.
108 IN PTR ubuntu.sys-admin.net
77 IN PTR dt.sys-admin.net
66 IN PTR lt.sys-admin.net
To list all the address entries in the local DNS server
ls -t A abc.com > /tmp/nslookup.out
http://www.debian-administration.org/articles/343
http://www.debianhelp.co.uk/bindweb.htm
http://ubuntuforums.org/showthread.php?t=236093