FreeBSD 14
Sponsored Link

BIND : Configure Zone Files2023/12/20

 
Replace Network or Domain name on the example below to your own environment.
[1] Create a zone file with forward lookup information that resolves IP addresses from hostnames.
The example below uses Internal network [10.0.0.0/24], Domain name [srv.world].
Replace them to your domain name, internal IP address, or external IP address for your needs.
root@dlp:~ #
vi /usr/local/etc/namedb/primary/srv.world.lan
$TTL 86400
@   IN  SOA     dlp.srv.world. root.srv.world. (
        ;; any numerical values are OK for serial number
        ;; recommended : [YYYYMMDDnn] (update date + number)
        2023122001  ;Serial
        3600        ;Refresh
        1800        ;Retry
        604800      ;Expire
        86400       ;Minimum TTL
)
        ;; define Name Server
        IN  NS      dlp.srv.world.
        ;; define Name Server's IP address
        IN  A       10.0.0.30
        ;; define Mail Exchanger Server
        IN  MX 10   dlp.srv.world.

;; define each IP address of a hostname
dlp     IN  A       10.0.0.30
www     IN  A       10.0.0.31
[2] Create a zone file with reverse lookup information that resolves hostnames from IP addresses.
The example below uses Internal network [10.0.0.0/24], Domain name [srv.world].
Replace them to your domain name, internal IP address, or external IP address for your needs.
root@dlp:~ #
vi /usr/local/etc/namedb/primary/0.0.10.db
$TTL 86400
@   IN  SOA     dlp.srv.world. root.srv.world. (
        2023122001  ;Serial
        3600        ;Refresh
        1800        ;Retry
        604800      ;Expire
        86400       ;Minimum TTL
)
        ;; define Name Server
        IN  NS      dlp.srv.world.

;; define each hostname of an IP address
30      IN  PTR     dlp.srv.world.
31      IN  PTR     www.srv.world.
[3]
Matched Content