FreeBSD 14
Sponsored Link

BIND : Configure Secondary Server2023/12/20

 
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 Host.
root@dlp:~ #
vi /usr/local/etc/namedb/named.conf
options {
.....
.....
        allow-query { localhost; internal-network; };
        // add secondary server to allow to transfer zone files
        allow-transfer { localhost; 192.168.100.85; };
.....
.....

root@dlp:~ #
vi /usr/local/etc/namedb/primary/srv.world.wan
$TTL 86400
@   IN  SOA     dlp.srv.world. root.srv.world. (
        ;; update serial number
        2023122003  ;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:~ #
rndc reload

server reload successful
[2] Configure on DNS Secondary Host.
root@ns:~ #
vi /usr/local/etc/namedb/external-zones.conf
// add target zone info
// IP address is the primary server's one

zone "srv.world" IN {
        type secondary;
        primaries { 172.16.0.82; };
        file "/usr/local/etc/namedb/secondary/srv.world.wan";
};

root@ns:~ #
rndc reload
root@ns:~ #
ls -l /usr/local/etc/namedb/secondary

total 5
-rw-r--r--  1 bind bind 377 Dec 20 11:18 srv.world.wan
# zone file has been transferred
Matched Content