DNS Server Configuration How to Configure install DNS Domain Name Service

DNS server it has two things primary DNS Server and the Secondary DNS server
In the very server it has server side configuration file and client side configuration file.
Primary DNS Server
Server side Configuration fileDNS Server Configuration Primary DNS Secondary Domain Name Service
Step 1:
#yum install bind bind­chroot bind­utils
Step 2:
create dns configuration file in /var/named/chroot
#vim /var/named/chroot/etc/named.conf
options {
directory “/var/named”;
};
zone “leena.com” {
type master;
file “leena.com.db”;
};
zone “0.168.192.in­addr.arpa” {
type master;
file “192.168.0.db”;
}
Step 3:
check Syntax of configuration file
#named­checkconf ­t /var/named/chroot
Step 4:
create zone forward lookup zone file under /var/named/chroot
#vim /var/named/chroot/var/named/leena.com.db
$TTL 86400
@ IN SOA system1.leena.com. root@system1.leena.com. (
1;serial no
10M;slave refresh interval
10M;slave retry interval
1W;expire interval
1D);Minimum ttl
@ IN NS system1.leena.com.
@ IN A 192.168.0.10
system1 IN A
sys1 IN A
sys2 IN A
192.168.0.10
192.168.0.1
192.168.0.2
};
Step 5:
check syntax of forward lookup zone file
#named­checkzone leena.com. /var/named/chroot/var/named/leena.com.db
Step 6:
create zone reverse lookup zone file under /var/named/chroot
#vim /var/named/chroot/var/named/leena.com.db
$TTL 86400
0.168.192.IN­ADDR.ARPA. IN SOA system1.leena.com.
root@system1.leena.com. (
1;serial no
10M;slave refresh interval
10M;slave retry interval
1W;expire interval
1D);Minimum ttl
@ IN NS system1.leena.com.
10.0.168.192.IN­ADDR.ARPA. IN PTR system1.leena.com.
1 IN PTR sys1.leena.com.
2 IN PTR sys2.leena.com.
Step 7:
check syntax of reverse lookup zone file
#named­checkzone leena.com. /var/named/chroot/var/named/192.168.0.db
Step 8:
add dns server entry in /etc/resolv.conf
search leena.com
nameserver 192.168.0.10
Step 9:
start the named service and load records
#chkconfig named on
#service named start
#rndc reload
Step 10:
check the dns resolvation
#nslookup leena.com;nslookup 192.168.0.10
Client Side DNS Domain Name service configuration in rhel5
Step 1:
add dns server entry in /etc/resolv.conf
search leena.com
nameserver 192.168.0.10
Step 2:
check the dns resolvation
#nslookup leena.com;nslookup 192.168.0.10
Secondary DNS Server Configuration file in Rhel5
System2 act as secondary name server
Step 1:
#yum install bind bind­chroot bind­utils
Step 2:
create dns configuration file in /var/named/chroot
#vim /var/named/chroot/etc/named.conf
options {
directory “/var/named”;
};
zone “leena.com” {
type slave;
masters { 192.168.0.10; };
file “slaves/leena.com.db”;
};
Step 3:
check Syntax of configuration file
#named­checkconf ­t /var/named/chroot
System1
Step 4:
add the slave server entry in master dns server
#vim /var/named/chroot/var/named/leena.com.db
$TTL 86400
@ IN SOA system1.leena.com. root@system1.leena.com. (
1;serial no
10M;slave refresh interval
10M;slave retry interval
1W;expire interval
1D);Minimum ttl
@ IN NS system1.leena.com.
@ IN A 192.168.0.10
@ IN NS system2.leena.com.
system2 IN A 192.168.0.20
system1 IN A192.168.0.10
sys1 IN A192.168.0.1
sys2 IN A192.168.0.2
Step 5:
Check syntax of forward lookup zone file
#named­checkzone leena.com. /var/named/chroot/var/named/leena.com.db
Step 6:
start the named service and load records
#service named restart
#rndc reload
system2:
Step 7:
add dns server entry in /etc/resolv.conf
search leena.com
nameserver 192.168.0.20
Step 8:
start the named service and load records
#chkconfig named on
#service named start
#rndc reload
Step 9:
check the dns resolvation
#nslookup leena.com
Client Side configuration file rhel5
Step 10:
add dns server entry in /etc/resolv.conf
search leena.com
nameserver 192.168.0.20
Step 11:
check the dns resolvation
#nslookup leena.com
#nslookup 192.168.0.20
Forward DNS Server Configuration in rhel5
system3:
#yum install bind bind­chroot bind­utils
Step 1:
create dns configuration file in /var/named/chroot
#vim /var/named/chroot/etc/named.conf
options {
directory “/var/named”;
};
zone “leena.com” {
type forward;
forwarders { 192.168.0.10; };
};
Step 2:
check Syntax of configuration file and start the service
#named­checkconf ­t /var/named/chroot
#chkconfig named on
#service named restart;rndc reload

Related post