[student@workstation dns-auto]$ cat files/primary-named.conf # /etc/named.conf (primary/secondary) # # For this exercise, primary and secondary name.conf files are identical but # have separate names in the project directory to avoid confusion when # configuring playblooks. # # Template file for BIND labs.
#Added the following pid-file "/run/named/named.pid"; session-keyfile "/run/named/session.key";
/* https://fedoraproject.org/wiki/Changes/CryptoPolicy */ include "/etc/crypto-policies/back-ends/bind.config";
};
#Added the following logging { channel default_debug { file "data/named.run"; severity dynamic; }; };
include "/etc/named.rfc1912.zones"; include "/etc/named.root.key"; include "/etc/named.backend.conf"; [student@workstation dns-auto]$
正向解析 zone 文件
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
[student@workstation dns-auto]$ cat files/primary-backend.lab.example.com.zone $TTL 300 @ IN SOA serverb.backend.lab.example.com. root.serverb.backend.lab.example.com. ( 2020041806 ;serial number 1H ;refresh secondary 5m ;retry refresh 1w ;expire zone 1m ) ;cache time-to-live for negative answers
; owner TTL CL type RDATA 600 IN NS serverb ; IN MX 10 serverb.backend.lab.example.com. ; IN A 192.168.0.11
servera IN A 192.168.0.10 serverb IN A 192.168.0.11 serverc IN A 192.168.0.12 serverd IN A 192.168.0.13 [student@workstation dns-auto]$
反向解析 zone 文件
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
[student@workstation dns-auto]$ cat files/primary-192.168.0.zone $TTL 300 @ IN SOA serverb.backend.lab.example.com. root.serverb.backend.lab.example.com. ( 2020041805 ;serial number 1H ;refresh secondary 5M ;retry refresh 1W ;expire zone 1M ) ;cache time-to-live for negative answers
; owner TTL CL type RDATA 600 IN NS serverb.backend.lab.example.com.
10.0.168.192.IN-ADDR.ARPA. IN PTR servera.backend.lab.example.com. 11 IN PTR serverb.backend.lab.example.com. 12 IN PTR serverc.backend.lab.example.com. 13 IN PTR serverd.backend.lab.example.com. [student@workstation dns-auto]$
添加的 zone 对应的 配置文件
1 2 3 4 5 6 7 8 9 10 11 12 13
[student@workstation dns-auto]$ cat files/primary-named.backend.conf zone "backend.lab.example.com" IN { type master; file "backend.lab.example.com.zone"; forwarders {}; };
zone "0.168.192.in-addr.arpa" IN { type master; file "192.168.0.zone"; forwarders {}; }; [student@workstation dns-auto]$
[student@workstation dns-auto]$ cat files/secondary-named.conf # /etc/named.conf (primary/secondary) # # For this exercise, primary and secondary name.conf files are identical but # have separate names in the project directory to avoid confusion when # configuring playblooks. # # Template file for BIND labs.