Primary DNS Server Configuration Part-3HARDWARE NETWORKING LINUX SOFTWAREIt Tech Technology

It Tech Technology

COMPUTER HARDWARE NETWORKING

Breaking

Home Top Ad

Post Top Ad

Thursday, November 26, 2015

Primary DNS Server Configuration Part-3



Step-6: Copy, rename & change the ownership & permission of  localhost.zone file  for Forward lookup zone.

[[email protected] ~]# cd /var/named/chroot/var/named/
[[email protected] named]# cp localhost.zone alphabd.fz
[[email protected] named]# chown root:named alphabd.fz
[[email protected] named]# chmod 777 alphabd.fz
[[email protected] named]# vi alphabd.fz

Original File:  localhost.zone

$TTL 86400
@          IN SOA     @       root (
                           42         ; serial (d. adams)
                           3H         ; refresh
                           15M        ; retry
                           1W         ; expiry
                           1D )       ; minimum

           IN NS @
          IN A       127.0.0.1
           IN AAAA         ::1

Modified File:  alphabd.fz

$TTL 86400
@          IN SOA     ns1.alphabd.net.       root.alphabd.net. (
                           2011022500 ; serial (d. adams)
                           3H         ; refresh
                           15M        ; retry
                           1W         ; expiry
                           1D )       ; minimum

         IN NS     ns1.alphabd.net.
ns1      IN A       210.207.201.1


Step-7: copy & rename the alphabd.fz  file  for Reverse lookup zone.

[[email protected] named]# cp alphabd.fz alphabd.rz
[[email protected] named]# vi alphabd.rz

Original File:  alphabd.fz

$TTL 86400
@          IN SOA     ns1.alphabd.net.       root.alphabd.net. (
                           2011022500 ; serial (d. adams)
                           3H         ; refresh
                           15M        ; retry
                           1W         ; expiry
                           1D )       ; minimum

           IN NS     ns1.alphabd.net.
ns1      IN A       210.207.201.1



Modified File:  alphabd.rz

$TTL 86400
@          IN SOA     ns1.alphabd.net.       root.alphabd.net. (
                           2011022500 ; serial (d. adams)
                           3H         ; refresh
                           15M        ; retry
                           1W         ; expiry
                           1D )       ; minimum

           IN NS     ns1.alphabd.net.
1        IN PTR     ns1.alphabd.net.



Step-8:  Edit the resolv.conf file by following this command


[[email protected] named]# vi /etc/resolv.conf

search alphabd.net
nameserver 210.207.201.1



Step-9:    Check the named.conf & zone file by following this commands,

[[email protected] ~]# named-checkzone  alphabd.net  /var/named/chroot/var/named/
alphabd.fz
[[email protected] ~]# named-checkzone  alphabd.net   /var/named/chroot/var/named/
alphabd.rz


Step-10: DNS check

[[email protected] ~]# service iptables stop
[[email protected] ~]# service network restart
[[email protected] ~]# chkconfig named on
[[email protected] ~]# service named restart/status/start/stop/configtest
[[email protected] ~]# host 210.207.201.1
[[email protected] ~]# host ns1.alphabd.net
[[email protected] ~]# Ping ns1.alphabd.net
[[email protected] ~]# nslookup ns1.alphabd.net
[[email protected] ~]# nslookup 210.207.201.1
[[email protected] ~]# dig ns1.alphabd.net
[[email protected] ~]# dig –x 210.207.201.1
[[email protected] ~]# dig –x ns1.alphabd.net
[[email protected] ~]# dig –t SOA alphabd.net


[[email protected] ~]# dig –t axfr alphabd.net

Post Bottom Ad