Bind9 名稱伺服器從屬伺服器有主檔案傳輸問題

Bind9 名稱伺服器從屬伺服器有主檔案傳輸問題

我已經設定了一個主名稱伺服器,現在我正在嘗試配置從伺服器。 Bind9 似乎加載並運行良好,但是我收到以下錯誤:

Apr 27 12:47:21 ns2 named[23563]: dumping master file: slaves/tmp-oJ5LJ1RtO4: open: file not found

這是我的named.conf.options 檔案:

options {

recursion yes;
allow-recursion { trusted; };
listen-on { 10.0.1.11; }; //this machines IP. 
allow-transfer { none; };

// If there is a firewall between you and nameservers you want
// to talk to, you may need to fix the firewall to allow multiple
// ports to talk.  See http://www.kb.cert.org/vuls/id/800113

// If your ISP provided one or more IP addresses for stable 
// nameservers, you probably want to use them as forwarders.  
// Uncomment the following block, and insert the addresses replacing 
// the all-0's placeholder.

forwarders {
    10.0.1.12;
    x.x.x.x; //keeping my ISPs nameservers private for post in askUbunutu
    x.x.x.x; //
};

//========================================================================
// If BIND logs error messages about the root key being expired,
// you will need to update your keys.  See https://www.isc.org/bind-keys
//========================================================================
dnssec-validation auto;

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

};

從站named.conf.local檔:

//
// Do any local configuration here
//

// Consider adding the 1918 zones here, if they are not used in your
// organization
//include "/etc/bind/zones.rfc1918";
zone "mycity.example.com" {
type slave;
file "slaves/db.mycity.example.com";
masters { 10.0.1.12; };
};

zone "1.0.10.in-addr.arpa" {
    type slave;
    file "slaves/db.10";
    masters { 10.0.1.12; };
};

/etc/bind/slaves 的目錄權限

drwxr-sr-x   2 bind bind  4096 Apr 27 09:41 slaves

知道我做錯了什麼嗎?

答案1

file 指令與 ubuntu 上的 bind var 目錄相關,預設如下:

/var/快取/綁定

除非使用選項中的目錄指令進行更改,否則它會尋找以下目錄來保存資料:

/var/cache/bind/slaves

請注意,無論如何,這可能是一個更好的位置,實際上,給予對它自己的/etc 目錄的綁定寫訪問權限並不理想,因為這樣做允許某人潛在地更改您的綁定配置,如果他們以某種方式利用更安全的綁定將變數資料保存在其他地方並讓伺服器寫在那裡。

相關內容