Configure Zone Files for each Zone set in [named.conf].
Replace Network or Domain name on the example below to your own environment.
Mục Lục
[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 [local].
Replace to your own environment.
[root@soncq ~]# vi /var/named/soncq.local.lan
$TTL 86400
@ IN SOA soncq.local. root.local. (
# 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 soncq.local.
# define Name Server's IP address
IN A 10.0.0.30
# define Mail Exchanger Server
IN MX 10 soncq.local.
# define each IP address of a hostname
soncq IN A 10.0.0.30
www IN A 10.0.0.31
[2] 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.world].
Replace to your own environment.
[root@soncq ~]# vi /var/named/0.0.10.db
$TTL 86400
@ IN SOA soncq.local. root.local. (
2021022401 ;Serial
3600 ;Refresh
1800 ;Retry
604800 ;Expire
86400 ;Minimum TTL
)
# define Name Server
IN NS soncq.local.
# define each hostname of an IP address
30 IN PTR soncq.local.
31 IN PTR www.local
[3] Next, Start BIND and Verify Name or Address Resolution, refer to here.