How to Configure Slave DNS

How to create Slave dns server

Step-1 First you need to run following command to install necessary packages for SLAVE DNS (BIND).

[ root@server2~ ]#  yum   install  bind  bind-chroot

 

Step-2  Now edit Main configuration file and make some necessary changes.

 

[root@server2~ ]#  vim    /etc/named.conf

options {

        listen-on port 53 { 127.0.0.1; 192.168.0.2; };

        listen-on-v6 port 53 { ::1; };

        directory       "/var/named";

        dump-file       "/var/named/data/cache_dump.db";

        statistics-file "/var/named/data/named_stats.txt";

        memstatistics-file "/var/named/data/named_mem_stats.txt";

        query-source    port 53;

        query-source-v6 port 53;

        allow-query    { localhost; 192.168.0.0/24; };

};

 

zone "leolinux.in" IN {

    type slave;

    file "slaves/leolinux-forward.zone";

     masters {  192.168.0.1; };

};

 

zone "0.168.192.in-addr.arpa" IN {

    type slave;

    file "slaves/leolinux-reverse.zone";

     masters {  192.168.0.1; };

};

 

 

Step-3  Enable and start the SLAVE DNS (named) service.

 

[root@server2~ ]#  chkconfig   named   on

[root@server2~ ]#  service    named    restart

 

Step-4  Now goto to following folder to check read-only copy of zones, which will be downloaded from master dns after starting named services.

[root@server2~ ]#   cd   /var/named/slaves

[root@server2~ ]#   ls         # will show you following zone files.

leolinux-reverse.zone     leolinux-forward.zone

Cheer!!