Scenario
FQDN name: server.chd.edu
Domain name : chd.edu
Hostname : server
IP address: 172.24.25.254
Clients name : stand1, stand2, stand3
Clients ip: 172.24.25.1, 172.24.25.2, 172.24.25.3
=====================================================================================
):- First of all, install the following packages from your linux dvd
# yum install bind* cachi*
):- Open /etc/named.rfc1912.zone and edit the following lines
# vim /etc/named.rfc1912.zone ßBase configuration file for caching name server
Zone “ chd.edu ” IN {
Type Master;
File “forward”;
Allow-update { none; };
};
Zone “ 24.172.in-addr.arpa” IN {
Type master ;
File “reverse”;
Allow-update { none; }
):- save and exit the file
):- check the above edited file with the following command
# named-checkconf /etc/named.rfc1912.zone
):- Now open the following file and make some changes
# vim /etc/named.caching-nameserver.conf ßConfiguration file that lists the location of all your domain zone files
Listen-on port 53 { 172.24.25.254; };
Allow-query { any; };
Match –clients { any; };
Match-destination { any; };
):- save and exit the file
):- check the above file with following command
# named-checkconf /etc/named.caching-nameserver.conf
):- Now create two files forward and reverse in /var/named/chroot/var/named and change their group from root to named
# cd /var/named/chroot/var/named
# touch forward reverse
# chgrp named forward
# chgrp named reverse
):- Now copy the file localhost.zone into forward and reverse file
):- Now open both forward and reverse file one by one and don’t delete the above lines
# vim forward
$TTL 86400
@ IN SOA @ root(
42 ; serial
3H ; refresh
15M ; retry
1w ; expiry
1D) ; minimum
################## CHANDIGARH NAME SERVER#########################################
@ IN NS server.chd.edu.
#####################CHANDIGARH NAME SERVER ADDRESS##############################
Server.chd.edu. IN A 172.24.25.254
#################### CLIENT ADDRESS RECORD #########################
Stand1 IN A 172.24.25.1
Stand2 IN A 172.24.25.2
Stand3 IN A 172.24.25.3
):-- save and exit the file
):-- Now check the file with the following command
# named-checkzone chd.edu forward
# vim reverse
$TTL 86400
@ IN SOA @ root(
42 ; serial
3H ; refresh
15M ; retry
1w ; expiry
1D) ; minimum
################## CHANDIGARH NAME SERVER#########################################
@ IN NS server.chd.edu.
####################CHANDIGARH NAME SERVER ADDRESS#############################
254 IN PTR server.chd.edu.
####################CLIENT ADDRESS RECORD########################################
1 IN PTR stand1.chd.edu.
2 IN PTR stand2.chd.edu.
3 IN PTR stand3.chd.edu.
):- save and exit the file and again check the file
# named-chechzone chd.edu reverse
):- start the named service and to check if dns is working use the DIG command
# service named restart
# chkconfig named restart
# dig server.chd.edu.
No comments:
Post a Comment