This video tutorial will show how to install and configure BIND9 DNS server on Red Hat 5, Centos 5 , Fedora or one of their derivatives. Checkout the text version of this tutorial. The tutorial was specifically written for Red Hat, Centos, Fedora and derivatives but it can be used for any Linux distributions.

















thanks a lot. This is very helpful. And more over could u help in configuring the reverse lookup …….
yes ..
where is the reverse lookup zone file
vi /var/named/2.168.192.in-addr.arpa.zone
***************
$TTL 1d
@ IN SOA ns.mydomain.com. hostmaster.mydomain.com. (
2010031500 ; se = serial number
3h ; ref = refresh
15m ; ret = update retry
3w ; ex = expiry
3h ; min = minimum
)
@ IN NS ns.mydomain.com.
; private hosts, reverse lookup
3 IN PTR ns.mydomain.com.
2 IN PTR mainserver.mydomain.com.
3 IN PTR centos.mydomain.com.
4 IN PTR fish.mydomain.com.
5 IN PTR whale.mydomain.com.
6 IN PTR monkey.mydomain.com.
7 IN PTR horse.mydomain.com.
8 IN PTR cow.mydomain.com.
****************************************
but configuring all this and all seems ok
service starts properly but when i do nslookup get below mentioned error:
[root@centos etc]# nslookup 192.168.12.2
Server: 192.168.12.3
Address: 192.168.12.3#53
2.12.168.192.in-addr.arpa name = mainserver.mydomain.com.
[root@centos etc]# nslookup mainserver
Server: 192.168.12.3
Address: 192.168.12.3#53
** server can’t find mainserver: NXDOMAIN
here is my complete configuration files:
vi /var/named/chroot/etc/named.conf
options {
directory “/var/named”;
dump-file “data/cache_dump.db”;
statistics-file “data/named_stats.txt”;
memstatistics-file “data/named_mem_stats.txt”;
version “currently unavailable”;
};
zone “mydomain.com” in {
type master;
file “mydomain.com.ns”;
allow-update { none; };
};
zone “12.168.192.in-addr.arpa” in {
type master;
file “12-168-192.in-addr.arpa.ns”;
allow-update { none; };
};
vi /var/named/chroot/var/named/mydomain.com.ns
****
$TTL 1d
@ IN SOA ns.mydomain.com. root (
;mydomain.com. IN SOA ns.mydomain.com. hostmaster.mydomain.com. (
2010031500 ; se = serial number
3h ; ref = refresh
15m ; ret = update retry
3w ; ex = expiry
3h ; min = minimum
)
IN NS ns.mydomain.com.
; private hosts
IN NS 192.168.12.3
ns IN A 192.168.12.3
fish IN A 192.168.12.4
whale IN A 192.168.12.5
monkey IN A 192.168.12.6
horse IN A 192.168.12.7
cow IN A 192.168.12.8
mainserver IN A 192.168.12.2
***********************
vi /var/named/chroot/var/named/12-168-192.in-addr.arpa.ns
*******
$TTL 1d
@ IN SOA ns.mydomain.com. hostmaster.mydomain.com. (
2010031500 ; se = serial number
3h ; ref = refresh
15m ; ret = update retry
3w ; ex = expiry
3h ; min = minimum
)
@ IN NS ns.mydomain.com.
; private hosts, reverse lookup
3 IN PTR ns.mydomain.com.
2 IN PTR mainserver.mydomain.com.
3 IN PTR centos.mydomain.com.
4 IN PTR fish.mydomain.com.
5 IN PTR whale.mydomain.com.
6 IN PTR monkey.mydomain.com.
7 IN PTR horse.mydomain.com.
8 IN PTR cow.mydomain.com.
****************************************
the error is
[root@centos etc]# nslookup 192.168.12.2
Server: 192.168.12.3
Address: 192.168.12.3#53
2.12.168.192.in-addr.arpa name = mainserver.mydomain.com.
[root@centos etc]# nslookup mainserver
Server: 192.168.12.3
Address: 192.168.12.3#53
** server can’t find mainserver: NXDOMAIN
[root@centos etc]#
kindly guide.
Best Regards,
Try fully qualified domain name like
dig mainserver.mydomain.com
I suspect, your have different search domain in /etc/resolv.conf.