绑定:从主文件加载失败:未找到文件

绑定:从主文件加载失败:未找到文件

所以我有点像个新手,我正在关注将域连接到我的服务器。这是我的代码:

命名的.conf.选项:

acl "trusted" {
        124.243.241.164;
        124.243.241.164;
        124.243.241.164;
        124.243.241.164;
};


options {
    directory "/var/cache/bind";

    recursion yes;                 
    allow-recursion { trusted; };  
    listen-on { 124.243.241.164; };  
    allow-transfer { none; };      

    forwarders {
            8.8.8.8;
            8.8.4.4;
    };


    dnssec-validation auto;

    auth-nxdomain no;    # conform to RFC1035
    listen-on-v6 { any; };
};

命名.conf.本地:

zone "ns1.raze.one" {
        type master;
        file "/etc/bind/zones/db.ns1.raze.one";
        allow-transfer { 124.243.241.164; };
 };
zone "243.124.in-addr.arpa" {
        type master;
        file "/etc/bind/zones/db.124.243";
        allow-transfer { 124.243.241.164; };
 };

数据库.124.243:

;
; BIND reverse data file for local loopback interface
;
$TTL    604800
@   IN  SOA ns1.raze.one. root.ns1.raze.one. (
                  3     ; Serial
             604800     ; Refresh
              86400     ; Retry
            2419200     ; Expire
             604800 )   ; Negative Cache TTL
; name servers - NS records
      IN      NS      ns1.ns1.raze.one.
      IN      NS      ns2.ns2.raze.one.
; PTR Records
164.241   IN      PTR     ns1.ns1.raze.one.    ; 124.243.241.164
164.241   IN      PTR     ns2.ns2.raze.one.    ; 124.243.241.164
164.241   IN      PTR     rdn.mercury.orderbox-dns.com.  ; 124.243.241.164
164.241   IN      PTR     rdn.venus.orderbox-dns.com.  ; 124.243.241.164

db.ns1.raze.one:

;
; BIND data file for local loopback interface
;
$TTL    604800
@   IN  SOA ns1.raze.one. root.ns1.raze.one. (
                  5     ; Serial
             604800     ; Refresh
              86400     ; Retry
            2419200     ; Expire
             604800 )   ; Negative Cache TTL
; name servers - NS records
    IN      NS      ns1.ns1.raze.one.
    IN      NS      ns2.ns1.raze.one.
; name servers - A records
ns1.ns1.raze.one.          IN      A       124.243.241.164
ns2.ns2.raze.one.          IN      A       124.243.241.164

; 124.243.241.164 - A records
rdn.mercury.orderbox-dns.com.        IN      A      124.243.241.164
rdn.venus.orderbox-dns.com.        IN      A      124.243.241.164

现在的问题是当我输入时sudo named-checkzone ns1.raze.one db.ns1.raze.one出现此错误:

zone ns1.raze.one/IN: loading from master file db.ns1.raze.one failed: file not found
zone ns1.raze.one/IN: not loaded due to errors. 

尽管这个文件确实存在!
并且当我这样做时sudo named-checkzone 124.243.in-addr.arpa /etc/bind/zones/db.124.243它正在工作:

zone 124.243.in-addr.arpa/IN: loaded serial 3
OK

我被这个问题困扰了一段时间,希望能够得到一点帮助。

答案1

这只是一个猜测,但声明directory指出/var/缓存/绑定/如果您指定了相对路径名,它将在那里搜索文件。您可以像之前一样指定绝对路径,也可以修改该directory语句。

相关内容