BIND : Configure Secondary Server2023/02/21 |
Configure DNS Secondary Server.
On this example, it shows to configure DNS Secondary Server [ns.server.education] (192.168.100.85) that
DNS Primary Server is [dlp.srv.world] (172.16.0.82) configured like here.
Replace IP address and Hostname to your own environment. |
|
[1] | Configure on DNS Primary Server Host. |
[root@dlp ~]#
vi /etc/named.conf ..... ..... options { listen-on port 53 { any; }; listen-on-v6 { any; }; 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"; secroots-file "/var/named/data/named.secroots"; recursing-file "/var/named/data/named.recursing"; allow-query { localhost; internal-network; }; # add secondary server to allow to transfer zone files allow-transfer { localhost; 192.168.100.85; }; ..... .....
[root@dlp ~]#
vi /var/named/srv.world.wan $TTL 86400 @ IN SOA dlp.srv.world. root.srv.world. ( # update serial if update zone file 2023022103 ;Serial 3600 ;Refresh 1800 ;Retry 604800 ;Expire 86400 ;Minimum TTL ) IN NS dlp.srv.world. # add secondary server IN NS ns.server.education. IN A 172.16.0.82 IN MX 10 dlp.srv.world. dlp IN A 172.16.0.82 www IN A 172.16.0.83[root@dlp ~]# systemctl restart named |
[2] | Configure onDNS Secondary Server Host. |
[root@ns ~]#
vi /etc/named.conf # add target zone info # for IP address, it's the Primary server's IP address zone "srv.world" IN { type slave; masters { 172.16.0.82; }; file "slaves/srv.world.wan"; notify no; };
[root@ns ~]#
[root@ns ~]# systemctl restart named
ls /var/named/slaves srv.world.wan # zone file transfered
|
Sponsored Link |