/* - If you are building an AUTHORITATIVE DNS server, do NOT enable recursion. - If you are building a RECURSIVE (caching) DNS server, you need to enable recursion. - If your recursive DNS server has a public IP address, you MUST enable access control to limit queries to your legitimate users. Failing to do so will cause your server to become part of large scale DNS amplification attacks. Implementing BCP38 within your network would greatly reduce such attack surface */ recursion yes;
dnssec-enable no; dnssec-validation no;
/* Path to ISC DLV key */ bindkeys-file "/etc/named.root.key";
修改域名配置文件 vi /etc/named.rfc1912.zones 在尾部添加 test.com 的域名
1 2 3 4 5 6 7 8
zone "test.com" IN { type master; file "test.com.zone"; allow-update { none; }; };
添加 DNS 解析配置文件 vi /var/named/test.com.zone 文件内容如下:
1 2 3 4 5 6 7 8 9 10 11 12 13 14
$TTL 1D @ IN SOA test.com. rname.invalid. ( 0 ; serial 1D ; refresh 1H ; retry 1W ; expire 3H ) ; minimum NS @ A 127.0.0.1 AAAA ::1 NS ns.test.com. ns IN A 192.168.92.82 www IN A 192.168.92.82 email IN A 192.168.92.82 # 服务器地址