Configure Zone Files

BIND : Configure Zone Files

Replace Network or Domain name on the example below to your own environment.

  1. Create zone files that servers resolve IP address from Domain name. The example below uses Internal network [10.0.0.0/24], Domain name [srv.onlinebrands]. Replace to your own environment.

[root@onlinebrands ~]# vi /var/named/srv.onlinebrands.lan
$TTL 86400
@   IN  SOA     os.srv.onlinebrands. root.srv.onlinebrands. (
        # any numerical values are OK for serial number but
        # recommendation is [YYYYMMDDnn] (update date + number)
        2021022401  ;Serial
        3600        ;Refresh
        1800        ;Retry
        604800      ;Expire
        86400       ;Minimum TTL
)
        # define Name Server
        IN  NS      os.srv.onlinebrands.
        # define Name Server's IP address
        IN  A       10.0.0.30
        # define Mail Exchanger Server
        IN  MX 10   os.srv.onlinebrands.

# define each IP address of a hostname
os     IN  A       10.0.0.30
www     IN  A       10.0.0.31
  1. Create zone files that servers resolve Domain name from IP address. The example below uses Internal network [10.0.0.0/24], Domain name [srv.onlinebrands]. Replace to your own environment.

[root@onlinebrands ~]# vi /var/named/0.0.10.db
$TTL 86400
@   IN  SOA     os.srv.onlinebrands. root.srv.onlinebrands. (
        2021022401  ;Serial
        3600        ;Refresh
        1800        ;Retry
        604800      ;Expire
        86400       ;Minimum TTL
)
        # define Name Server
        IN  NS      os.srv.onlinebrands.

# define each hostname of an IP address
30      IN  PTR     os.srv.onlinebrands.
31      IN  PTR     www.srv.onlinebrands.
  1. Next, Start BIND and Verify Name or Address Resolution.