我正在尝试为域名 innobignet.local 创建一个新的主区域,但一直出现错误。
我正在使用 WebMin 配置新的主区域,因此语法上应该正确。我还手动检查了区域文件和配置文件,它们对我来说似乎都是正确的。
这是错误日志:
-- Unit named.service has begun starting up.
Aug 09 22:07:58 centos7-test.innobignet.local bash[5496]: zone localhost.localdomain/IN: loaded serial 0
Aug 09 22:07:58 centos7-test.innobignet.local bash[5496]: zone localhost/IN: loaded serial 0
Aug 09 22:07:58 centos7-test.innobignet.local bash[5496]: 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.0.ip6.arpa/IN: loaded serial 0
Aug 09 22:07:58 centos7-test.innobignet.local bash[5496]: zone 1.0.0.127.in-addr.arpa/IN: loaded serial 0
Aug 09 22:07:58 centos7-test.innobignet.local bash[5496]: zone 0.in-addr.arpa/IN: loaded serial 0
Aug 09 22:07:58 centos7-test.innobignet.local bash[5496]: zone innobignet.local/IN: NS 'centos7-test.innobignet.local' has no address records (A or AAAA)
Aug 09 22:07:58 centos7-test.innobignet.local bash[5496]: zone innobignet.local/IN: not loaded due to errors.
Aug 09 22:07:58 centos7-test.innobignet.local bash[5496]: _default/innobignet.local/IN: bad zone
Aug 09 22:07:58 centos7-test.innobignet.local systemd[1]: named.service: control process exited, code=exited status=1
Aug 09 22:07:58 centos7-test.innobignet.local systemd[1]: Failed to start Berkeley Internet Name Domain (DNS).
-- Subject: Unit named.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit named.service has failed.
--
-- The result is failed.
Aug 09 22:07:58 centos7-test.innobignet.local systemd[1]: Unit named.service entered failed state.
Aug 09 22:07:58 centos7-test.innobignet.local systemd[1]: named.service failed.
这是配置文件。
options {
listen-on port 53 {
192.168.1.7;
};
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
memstatistics-file "/var/named/data/named_mem_stats.txt";
recursion yes;
dnssec-enable yes;
dnssec-validation yes;
/* Path to ISC DLV key */
bindkeys-file "/etc/named.iscdlv.key";
managed-keys-directory "/var/named/dynamic";
pid-file "/run/named/named.pid";
session-keyfile "/run/named/session.key";
forwarders {
203.12.160.35;
203.12.160.36;
8.8.8.8;
};
};
logging {
channel default_debug {
file "data/named.run";
severity dynamic;
};
};
zone "." IN {
type hint;
file "named.ca";
};
include "/etc/named.rfc1912.zones";
include "/etc/named.root.key";
zone "innobignet.local" {
type master;
file "/var/named/innobignet.local.hosts";
};
这是我的区域文件:
$ttl 38400
innobignet.local. IN SOA centos7-test.innobignet.local. bob.green.live.com (
1470744461
10800
3600
604800
38400 )
innobignet.local. IN NS centos7-test.innobignet.local.
答案1
您的区域文件中的记录看起来是正确的,但数量不够,您的区域不完整。您发布的错误消息很清楚地说明了这一点:
NS‘centos7-test.innovisage.local’没有地址记录(A 或 AAAA)
解决方案也很简单,您需要添加 A 或 AAAA 记录:
centos7-test.innovisage.local. IN A 198.51.100.1
或 DNS 简写中的等效内容
centos7-test IN A 198.51.100.1