Previous Article Next Article DNS Bind – 修復 rndc: connection to remote host closed
Posted in Linux

DNS Bind – 修復 rndc: connection to remote host closed

DNS Bind – 修復 rndc: connection to remote host closed Posted on 2018 年 09 月 11 日Leave a comment

rndc status
WARNING: key file (/etc/rndc.key) exists, but using default configuration file (/etc/rndc.conf)
rndc: connection to remote host closed
This may indicate that
* the remote server is using an older version of the command protocol,
* this host is not authorized to connect,
* the clocks are not synchronized, or
* the key is invalid.

重建 rndc.conf

rndc-confgen -r /dev/urandom > /etc/rndc.conf

重新產生 rndc.key

rndc-confgen -a -r /dev/urandom

將 /etc/rndc.conf 裡註解的部份放到 /etc/named.conf,變成如下,原本裡面如果有 include ‘/etc/rndc.key’; 就刪除

key "rndc-key" {
algorithm hmac-md5;
secret "I4KvY0KjDv82F5iv6fFEfw==";
};

controls {
inet 127.0.0.1 port 953
allow { 127.0.0.1; } keys { "rndc-key"; };
};

發表迴響

你的電子郵件位址並不會被公開。 必要欄位標記為 *