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.

[root@ns1 ~]# cd /var/named/chroot/var/named/
[root@ns1 named]# cp localhost.zone alphabd.fz
[root@ns1 named]# chown root:named alphabd.fz
[root@ns1 named]# chmod 777 alphabd.fz
[root@ns1 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.

[root@ns1 named]# cp alphabd.fz alphabd.rz
[root@ns1 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


[root@ns1 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,

[root@ns1 ~]# named-checkzone  alphabd.net  /var/named/chroot/var/named/
alphabd.fz
[root@ns1 ~]# named-checkzone  alphabd.net   /var/named/chroot/var/named/
alphabd.rz


Step-10: DNS check

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


[root@ns1 ~]# dig –t axfr alphabd.net

Post Bottom Ad