Linux 使用 bind9 忽略区域外数据问题

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/7654883/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-05 06:30:25  来源:igfitidea点击:

ignoring out-of-zone data issues with bind9

linuxbind

提问by The Digital Ninja

I get these errors when starting bind9 and it doesn't load the records. According to everything I can find it should be right, but its not passing named-checkzone for the same reason.

我在启动 bind9 时遇到这些错误并且它不加载记录。根据我能找到的一切,它应该是正确的,但出于同样的原因,它没有通过命名检查区。

Oct  4 22:35:44 li205-55 named[7828]: /etc/bind/zones/lan.master.listenerapproved.com:3: ignoring out-of-zone data (listenerapproved.com)
Oct  4 22:35:44 li205-55 named[7828]: /etc/bind/zones/lan.master.listenerapproved.com:10: ignoring out-of-zone data (listenerapproved.com)
Oct  4 22:35:44 li205-55 named[7828]: /etc/bind/zones/lan.master.listenerapproved.com:12: ignoring out-of-zone data (listenerapproved.com)
Oct  4 22:35:44 li205-55 named[7828]: /etc/bind/zones/lan.master.listenerapproved.com:13: ignoring out-of-zone data (ns1.listenerapproved.com)
Oct  4 22:35:44 li205-55 named[7828]: /etc/bind/zones/lan.master.listenerapproved.com:16: ignoring out-of-zone data (application01.listenerapproved.com)
Oct  4 22:35:44 li205-55 named[7828]: /etc/bind/zones/lan.master.listenerapproved.com:17: ignoring out-of-zone data (zenoss.listenerapproved.com)
Oct  4 22:35:44 li205-55 named[7828]: zone internal.listenerapproved.com2/IN/internal-view: has 0 SOA records
Oct  4 22:35:44 li205-55 named[7828]: zone internal.listenerapproved.com2/IN/internal-view: has no NS records
Oct  4 22:35:44 li205-55 named[7828]: zone internal.listenerapproved.com2/IN/internal-view: not loaded due to errors.

And here ins my lan.master file

这是我的 lan.master 文件

$ORIGIN listenerapproved.com.
$TTL 3600
@        IN SOA ns1.listenerapproved.com. webmaster.listenerapproved.com. (
                       2011100338        ; Serial yyyymmddnn
                       3h                ; Refresh After 3 hours
                       1h                ; Retry Retry after 1 hour
                       1h                ; Expire after 1 week 1w
                       1h)             ; Minimum negative caching of 1 hour

@                              IN NS    ns1.listenerapproved.com.

@                      3600    IN A     173.255.195.55
ns1                    3600    IN A     173.255.195.55
;out-router             3600    IN A     208.43.79.100
; lan data
application01          3600    IN A     192.168.168.18
zenoss                 3600    IN A     192.168.159.236
;in-router              3600    IN A     192.168.1.254
; add other lan specifc data below

Here is my named.conf if it helps

如果有帮助,这是我的named.conf

options {
        directory "/var/cache/bind";
        forwarders { 8.8.8.8; };
        auth-nxdomain no;    # conform to RFC1035
        listen-on-v6 { any; };
        allow-recursion { internal; };
};


acl internal { localnets; localhost; };

//
// Lan zone recursion is the default
//
view "internal-view" {
  match-clients { internal; };
  zone "." IN {
    type hint;
    file "/etc/bind/db.root";
  };
  zone "internal.listenerapproved.com " IN {
    type master;
    file "/etc/bind/zones/lan.master.listenerapproved.com";
    allow-transfer { key TRANSFER; };
  };
};
//
// external zone w/o recursion
//
view "external-view" {
  match-clients { any; };
  recursion no;
  zone "listenerapproved.com " IN {
    type master;
    file "/etc/bind/zones/internet.master.listenerapproved.com";
    allow-transfer { key TRANSFER; };
  };
};

采纳答案by The Digital Ninja

wow.....it was just the extra space at the end of

哇.....这只是末尾的额外空间

zone "internal.listenerapproved.com "

区域“internal.listenerapproved.com”