首页 > 代码库 > bind_DNS
bind_DNS
配置环境CentOS 6.7: listen-on-v6 port 53 { ::1; }; 改成本机 或删掉 allow-query { localhost; }; 允许请求的 ip 改成any 或删掉 recursion yes; //开启认证相关 dnssec-enable yes; dnssec-validation yes; bindkeys-file "/etc/named.iscdlv.key"; //认证模块相关 不需要配置 managed-keys-directory "/var/named/dynamic"; pid-file "/run/named/named.pid"; session-keyfile "/run/named/session.key"; }继续编辑文件 ]# vim /etc/named.rfc1912.zones //声明区域的文件 添加:(正向解析) zone "lenovo.com" IN { 区域名称 master|slave|hint|forward type master; 区域类型 file "lenovo.com.zone"; 文件位置及名称 相对路径 /var/named/ }; $TTL 3600 @ IN SOA lenovo.com. admin.lenovo.com. ( @当前区域名称 [客户端缓存时常] IN SOA 区域名 管理员地址 01 ; serial 序列号,作为从节点更新依据 2H ; refresh 刷新时间 10M ; retry 重试时间 1W ; expire 过期时间 1D ; negative answer ttl 否定答案的ttl值 ) IN NS ns1 ns1 IN A 172.16.79.100 web-httpd01 IN A 172.16.41.105 web-httpd02 IN A 172.16.41.106 web-httpd03 IN A 172.16.41.107 lb-nginx01 IN A 172.16.40.100 lb-nginx02 IN A 172.16.40.101 www IN A 172.16.40.88 web IN CNAME www cache-memcache01 IN A 172.16.26.101 db-mariadb01 IN A 172.16.29.1 monitor-zabbbix01 IN A 172.16.79.72 |
bind_DNS