1、安装
yum install -y bind bind-utils
2、配置
1)/etc/name.conf 修改监听端口
listen-on port 53 { any; };
2)/etc/named.rfc1912.zones 添加一个区域
zone "dns.xxxxxxx.com" IN { type master; file "/etc/named/zones/db.dns.xxxxxxx.com"; allow-update { none; }; };
3) /etc/named/zones/db.dns.xxxxxxx.com
$TTL 60 @ IN SOA ns1.dns.xxxxxx.com. root.dns.xxxxxx.com. ( 2019051902 ; Serial 60 ; Refresh 10 ; Retry 600 ; Expire 120 ) ; Negative Cache TTL ; name servers - NS records IN NS ns1.dns.xxxxxx.com. ; name servers - A records ns1.dns.xxxxxx.com. IN A 149.xxx.xx.xx ; 10.11.0.0/16 - A records pj1.dns.xxxxx.com. IN A 42.xxx.x.xx
systemctl restart named
http://faculty.ndhu.edu.tw/~comput/computer_c/training/hbc0122/dns-2.htm