我正在尝试使用 nsupdate 动态更新我的 DNS 服务器。
我在我的 DNS 服务器上使用 Debian 6,在我的客户端上使用 Debian 4。
我使用以下方法创建了一个公钥/私钥对:
dnssec-keygen -C -a HMAC-MD5 -b 512 -n USER sub.example.com.
Run Code Online (Sandbox Code Playgroud)
然后我编辑了我的named.conf.local以包含我的公钥和我希望更新的新区域。现在看起来像这样(注意:我也尝试过allow-update { any; };没有成功):
zone "example.com" {
type master;
file "/etc/bind/primary/example.com";
notify yes;
allow-update { none; };
allow-query { any; };
};
zone "sub.example.com" {
type master;
file "/etc/bind/primary/sub.example.com";
notify yes;
allow-update { key "sub.example.com."; };
allow-query { any; };
};
key sub.example.com. {
algorithm HMAC-MD5;
secret "xxxx xxxx";
};
Run Code Online (Sandbox Code Playgroud)
接下来,我将私钥文件 ( key.private …