我刚刚切换到bind9.9.5动态 DNS功能,具有 DNSSEC 条目的半自动管理,整个过程进行得很顺利,我的区域文件更新得很好,但现在我无法通过nsupdate工具更新或添加条目。
的/etc/bind/named.conf.local:
// 1
view "localhost_view" {
allow-query-on { 127.0.0.1; };
allow-query { localhost_acl; };
match-clients { localhost_acl; };
zone "somehost.tld" {
type master;
file "/etc/bind/db.somehost.tld_10";
};
zone "168.192.in-addr.arpa" {
type master;
notify no;
file "/etc/bind/db.192.168.10";
};
// formerly named.conf.default-zones
zone "." {
type hint;
file "/etc/bind/db.root";
};
zone "localhost" {
type master;
file "/etc/bind/db.local";
};
zone "127.in-addr.arpa" {
type master;
file "/etc/bind/db.127";
};
zone "0.in-addr.arpa" {
type master; …Run Code Online (Sandbox Code Playgroud) 我一直在尝试设置一个可以更新的域。我正在使用bind9,我已经用过
ddns-confgen -a hmac-sha512 -k <keyname>
Run Code Online (Sandbox Code Playgroud)
为了生成我的密钥,我已将密钥添加到 /etc/bind/keys.local 中
key "<keyname>" {
algorithm hmac-sha512;
secret "<secret>";
};
Run Code Online (Sandbox Code Playgroud)
我的named.conf 文件如下所示:
include "/etc/bind/keys.local";
include "/etc/bind/named.conf.options";
include "/etc/bind/named.conf.local";
include "/etc/bind/named.conf.default-zones";
Run Code Online (Sandbox Code Playgroud)
我的named.conf.local 文件如下所示:
zone "<subdomain_name>" {
type master;
update-policy {
grant <keyname> zonesub ANY;
};
file "<zone_file>"; # zone file path
};
zone "<reverse_zone>.in-addr.arpa" {
type master;
update-policy {
grant <keyname> zonesub ANY;
};
file "<reverse_zone_file>";
};
Run Code Online (Sandbox Code Playgroud)
我错过了一些明显的东西吗?因为当我这样做时:
sudo nsupdate -k <keyfile>
server <dns_server>
zone <subdomain_name>
update add newhost.<subdomain_name> 86400 A <newhost_ip>
send
Run Code Online (Sandbox Code Playgroud)
我最终得到了 …
我的 DNS 中有一个域条目,其中包含 3 个不同的 TXT 记录(1 个 SPF、1 个密钥库证明和一个 DMARC 条目)。
我即将将我的邮件服务器移至新主机,因此需要更新 SPF 记录,但我正在努力找出如何使用 nsupdate 删除和替换 SPF 记录。
目前,我能想到的最佳选择是编写 nsupdate 脚本来删除所有 3 个记录,并在添加更新的 SPF 记录之前添加 2 个未更改的记录。
有没有办法只删除1条记录?