这是在带有 BIND9 的 CentOS 7 上。当我运行 nsupdate 来测试 ddns 更新时,我遇到了几个级别的失败。在添加反向区域时,我得到 . 然后在添加前向区域条目时,我得到 . 我已经到了谷歌的尽头,试图找出我做错了什么——有人知道这里有什么问题吗?我什至还没有进入 DHCPD,尽管我已经配置好了一切并准备好了。
nsupdate
> server ns1.office.somecompany.com
> key rndc-key xxxxxxxxxxxxxxxxxxxxxxx==
> zone office.somecompany.com.
> update add 55.4.168.192.in-addr.arpa. 600 IN PTR stinky.office.somecompany.com.
> send
update failed: NOTZONE
> update add stinky.office.somecompany.com. 600 IN A 192.168.4.55
> send
update failed: SERVFAIL
如果我将上述命令放入一个文件 (test.bind.ddns) 并添加调试开关,我的输出对我来说不再有帮助:
[root@ns1 ~]# nsupdate -d test.bind.ddns
Sending update to 192.168.4.25#53
Outgoing update query:
;; ->>HEADER<<- opcode: UPDATE, status: NOERROR, id: 2851
;; flags:; ZONE: 1, PREREQ: 0, UPDATE: 1, ADDITIONAL: 1
;; ZONE SECTION:
;office.somecompany.com. IN SOA
;; UPDATE SECTION:
55.4.168.192.in-addr.arpa. 600 IN PTR stinky.office.somecompany.com.
;; TSIG PSEUDOSECTION:
rndc-key. 0 ANY TSIG hmac-md5.sig-alg.reg.int. 1424040289 300 16 aaaaaaaaaaaaaaaaaaaaaa== 2851 NOERROR 0
Reply from update query:
;; ->>HEADER<<- opcode: UPDATE, status: NOTZONE, id: 2851
;; flags: qr ra; ZONE: 1, PREREQ: 0, UPDATE: 0, ADDITIONAL: 1
;; ZONE SECTION:
;office.somecompany.com. IN SOA
;; TSIG PSEUDOSECTION:
rndc-key. 0 ANY TSIG hmac-md5.sig-alg.reg.int. 1424040289 300 16 bbbbbbbbbbbbbbbbbbbbbb== 2851 NOERROR 0
Sending update to 192.168.4.25#53
Outgoing update query:
;; ->>HEADER<<- opcode: UPDATE, status: NOERROR, id: 13185
;; flags:; ZONE: 1, PREREQ: 0, UPDATE: 1, ADDITIONAL: 1
;; ZONE SECTION:
;office.somecompany.com. IN SOA
;; UPDATE SECTION:
stinky.office.somecompany.com. 600 IN A 192.168.4.55
;; TSIG PSEUDOSECTION:
rndc-key. 0 ANY TSIG hmac-md5.sig-alg.reg.int. 1424040289 300 16 cccccccccccccccccccccc== 13185 NOERROR 0
Reply from update query:
;; ->>HEADER<<- opcode: UPDATE, status: SERVFAIL, id: 13185
;; flags: qr ra; ZONE: 1, PREREQ: 0, UPDATE: 0, ADDITIONAL: 1
;; ZONE SECTION:
;office.somecompany.com. IN SOA
;; TSIG PSEUDOSECTION:
rndc-key. 0 ANY TSIG hmac-md5.sig-alg.reg.int. 1424040289 300 16 dddddddddddddddddddddd== 13185 NOERROR 0
Sending update to 192.168.4.25#53
Outgoing update query:
;; ->>HEADER<<- opcode: UPDATE, status: NOERROR, id: 56384
;; flags:; ZONE: 1, PREREQ: 0, UPDATE: 0, ADDITIONAL: 1
;; ZONE SECTION:
;office.somecompany.com. IN SOA
;; TSIG PSEUDOSECTION:
rndc-key. 0 ANY TSIG hmac-md5.sig-alg.reg.int. 1424040289 300 16 ffffffffffffffffffffff== 56384 NOERROR 0
Reply from update query:
;; ->>HEADER<<- opcode: UPDATE, status: NOERROR, id: 56384
;; flags: qr ra; ZONE: 1, PREREQ: 0, UPDATE: 0, ADDITIONAL: 1
;; ZONE SECTION:
;office.somecompany.com. IN SOA
;; TSIG PSEUDOSECTION:
rndc-key. 0 ANY TSIG hmac-md5.sig-alg.reg.int. 1424040289 300 16 gggggggggggggggggggggg== 56384 NOERROR 0
[root@ns1 ~]#
以下是配置文件:
/etc/named.conf
options {
directory "/var/named";
recursion yes;
allow-recursion { trusted; };
listen-on { 192.168.4.25; };
allow-query { 192.168.4/24; 127.0.0.1; };
allow-transfer { 192.168.4/24; 127.0.0.1; };
forwarders {
8.8.8.8;
8.8.4.4;
};
};
key "rndc-key" {
algorithm hmac-md5;
secret "xxxxxxxxxxxxxxxxxxxxxx==";
};
acl "trusted" {
192.168.4.0/24;
};
zone "." IN {
type hint;
file "named.ca";
};
# forward lookup
zone "office.somecompany.com" {
type master;
file "/var/named/forward.office.somecompany.com";
allow-update { key rndc-key; };
};
# reverse lookup
zone "168.192.4.in-addr.arpa" {
type master;
file "/var/named/reverse.office.somecompany.com";
allow-update { key rndc-key; };
};
/var/named/reverse.office.somecompany.com
$TTL 604800
@ IN SOA office.somecompany.com. tj.hooker.us. (
2015021503 ; Serial YYYYMMDD0x
604800 ; Refresh (1 week)
86400 ; Retry (1 day)
2419200 ; Expire (4 weeks)
604800 ) ; Negative Cache TTL (1 week)
; name servers
IN NS ns1.office.somecompany.com.
IN NS ns2.office.somecompany.com.
; PTR records
25 IN PTR ns1.office.somecompany.com.
26 IN PTR ns2.office.somecompany.com.
14 IN PTR fileserv01.office.somecompany.com.
/var/named/forward.office.somecompany.com
$TTL 604800
@ IN SOA ns1.office.somecompany.com. tj.hooker.us. (
2015021511 ; Serial YYYYMMDD1x
604800 ; Refresh (1 week)
86400 ; Retry (1 day)
2419200 ; Expire (4 weeks)
604800 ) ; Negative Cache TTL (1 week)
; name servers - NS records
IN NS ns1.office.somecompany.com.
IN NS ns2.office.somecompany.com.
; A records for name servers
ns1.office.somecompany.com. IN A 192.168.4.25
ns2.office.somecompany.com. IN A 192.168.4.26
; Other A records
fileserv01.office.somecompany.com. IN A 192.168.4.14
named-chezkconfig 和 named-checkzone 不再报告错误,但我已经为此工作了数周,但仍未让它动态更新 DNS。有什么线索吗?谢谢,-杰夫