named.conf 中的注释行仍被解释

named.conf 中的注释行仍被解释

我最近发现我的域名(在 Trusty 专用服务器上设置)不再解析。
我​​没有及时注意到这一点,无法确定(服务器尚未“投入生产”,它被视为“附带项目”……),但我认为问题是在 apt-get 升级后出现的……

我做了一个

root@mydomain:/etc/bind# named-checkzone mydomain.tld /etc/bind/named.conf

并惊奇地得到了这个:

/etc/bind/named.conf:1: unknown RR type 'This'
dns_master_load: /etc/bind/named.conf:3: unexpected end of line
dns_master_load: /etc/bind/named.conf:2: unexpected end of input
/etc/bind/named.conf:4: unknown RR type 'structure'
/etc/bind/named.conf:5: unknown RR type 'this'
...

长话短说:看来注释掉的行已经被解释了!

这是原始的named.conf文件

// This is the primary configuration file for the BIND DNS server named.
//
// Please read /usr/share/doc/bind9/README.Debian.gz for information on the
// structure of BIND configuration files in Debian, *BEFORE* you customize
// this configuration file.
//
// If you are just adding zones, please do that in /etc/bind/named.conf.local

include "/etc/bind/named.conf.options";
include "/etc/bind/named.conf.local";
include "/etc/bind/named.conf.default-zones";

//Zone domaine de test
zone "mydomain.tld" {
  type master;
  file "/etc/bind/db.mydomain.tld";
  allow-transfer { trusted; wtfdns; };
  allow-query { any; };
  };

这是 Bind9 的“新功能”吗?
我尝试了 # 和 / * ...* / 方法,但似乎都不起作用!
我们该如何评论出来呢?
更糟糕的是:如果生成的文件混乱,我们如何信任 Bind9

我在不知名的论坛上发现了几篇关于同一问题的帖子,通常通过删除所有注释行来“解决”。

我不想成为继承这个东西的人的混蛋,所以我需要到处留下评论!

相关内容