这是我的配置(以centos命名).
的/etc/named.conf
options { ## path to zone files ## directory "/var/named"; ## forward non-local to google ## forwarders { 8.8.8.8; }; }; zone "gallactica.lab" IN { type master; file "named.gallactica.lab"; allow-update { none; }; }; zone "1.168.192.in-addr.arpa" IN { type master; file "rz-192-168-1"; allow-update { none; }; };
/var/named/named.gallactica.lab
$TTL 1D @ IN SOA ns1.gallactica.lab. admin.gallactica.lab. ( 0 ; serial 1D ; refresh 1H ; retry 1W ; expire 3H ) ; minimum IN NS ns1.gallactica.lab. IN A 192.168.1.105 ns1 IN A 192.168.1.105 proxmox IN A 192.168.1.180
在/ var /命名/ RZ-192-168-1
$TTL 1D @ IN SOA ns1.gallactica.lab. admin.gallactica.lab. ( 0 ; serial 1D ; refresh 1H ; retry 1W ; expire 3H ) ; minimum IN NS ns1.gallactica.lab. 105 IN PTR ns1.gallactica.lab. 180 IN PTR proxmox.gallactica.lab.
我的DNS服务器是ns1.gallactica.lab,地址为192.168.1.105.
我尝试重新启动命名服务时遇到的错误是:
Jan 19 20:18:10 ns1.gallactica.lab named-checkconf[6469]: zone 1.168.192.in-addr.arpa/IN: not loaded due to errors. Jan 19 20:18:10 ns1.gallactica.lab named-checkconf[6469]: _default/1.168.192.in-addr.arpa/IN: bad zone Jan 19 20:18:10 ns1.gallactica.lab named-checkconf[6469]: zone localhost.localdomain/IN: loaded serial 0 Jan 19 20:18:10 ns1.gallactica.lab named-checkconf[6469]: zone localhost/IN: loaded serial 0 Jan 19 20:18:10 ns1.gallactica.lab named-checkconf[6469]: zone 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0....ial 0 Jan 19 20:18:10 ns1.gallactica.lab named-checkconf[6469]: zone 1.0.0.127.in-addr.arpa/IN: loaded serial 0 Jan 19 20:18:10 ns1.gallactica.lab named-checkconf[6469]: zone 0.in-addr.arpa/IN: loaded serial 0 Jan 19 20:18:10 ns1.gallactica.lab systemd[1]: named.service: control process exited,code=exited status=1 Jan 19 20:18:10 ns1.gallactica.lab systemd[1]: Failed to start Berkeley Internet Name Domain (DNS). Jan 19 20:18:10 ns1.gallactica.lab systemd[1]: Unit named.service entered Failed state.