大网数据广告活动
服务器运维问答

ISC-DHCP and Bind9: DDNS update fails for reverse map (NOTAUTH)

· 52CE 我爱测

I use the isc-dhcp-server with this configuration /etc/dhcp/dhcpd.conf : ddns-updates on; ddns-update-style interim; include "/etc/bind/rndc.key"; authoritative; zone bat. { primary localhost; key rndc-key; } zone lan.bat. { prim…

问题原文

原帖链接 · kiigass · CC BY-SA 3.0

I use the isc-dhcp-server with this configuration /etc/dhcp/dhcpd.conf:

ddns-updates on;
ddns-update-style interim;
include "/etc/bind/rndc.key";
authoritative;
zone bat. {
  primary localhost;
  key rndc-key;
}
zone lan.bat. {
  primary localhost;
  key rndc-key;
}
zone wlan.bat. {
  primary localhost;
  key rndc-key;
}
zone 10.in-addr.arpa. {
  primary localhost;
  key rndc-key;
}
zone 50.10.in-addr.arpa. {
  primary localhost;
  key rndc-key;
}
zone 100.10.in-addr.arpa. {
  primary localhost;
  key rndc-key;
}
subnet 10.50.0.0 netmask 255.255.0.0 {
  range 10.50.100.100 10.50.100.199;
  interface eth0;
  option domain-name-servers 10.50.0.1;
  option domain-name "lan.bat";
  option domain-search "lan.bat", "bat", "wlan.bat";
  option routers 10.50.0.1;
  option broadcast-address 10.50.255.255;
  default-lease-time 600;
  max-lease-time 7200;
}
subnet 10.100.0.0 netmask 255.255.0.0 {
  range 10.100.100.100 10.100.100.199;
  interface wlan0;
  option domain-name-servers 10.100.0.1;
  option domain-name "wlan.bat";
  option domain-search "wlan.bat", "bat", "lan.bat";
  option routers 10.100.0.1;
  option broadcast-address 10.100.255.255;
  default-lease-time 600;
  max-lease-time 7200;
}

and bind9 with this /etc/bind/named.conf.local:

include "/etc/bind/rndc.key";

zone "bat" {
        type master;
        file "/etc/bind/zones/db.bat.zone";
        notify yes;
        allow-update { key rndc-key; };
};

zone "lan.bat" {
        type master;
        file "/etc/bind/zones/db.lan.bat.zone";
        notify yes;
        allow-update { key rndc-key; };
};

zone "wlan.bat" {
        type master;
        file "/etc/bind/zones/db.wlan.bat.zone";
        notify yes;
        allow-update { key rndc-key; };
};

zone "10.in-addr-arpa" {
        type master;
        file "/etc/bind/zones/db.rev.10.in-addr-arpa.zone";
        allow-update { key rndc-key; };
};

zone "50.10.in-addr-arpa" {
        type master;
        file "/etc/bind/zones/db.rev.50.10.in-addr-arpa.zone";
        allow-update { key rndc-key; };
};

zone "100.10.in-addr-arpa" {
        type master;
        file "/etc/bind/zones/db.rev.100.10.in-addr-arpa.zone";
        allow-update { key rndc-key; };
};

When I reconnect with a client to optain a new IP my syslog says:

Sep  3 07:09:12 alfred named[7393]: client 127.0.0.1#7429/key rndc-key: signer "rndc-key" approved
Sep  3 07:09:12 alfred named[7393]: client 127.0.0.1#7429/key rndc-key: updating zone 'lan.bat/IN': adding an RR at 'batmobil.lan.bat' A 10.50.100.100
Sep  3 07:09:12 alfred named[7393]: client 127.0.0.1#7429/key rndc-key: updating zone 'lan.bat/IN': adding an RR at 'batmobil.lan.bat' TXT "00b1a718622197bea9dacc93e33fb507f8"
Sep  3 07:09:12 alfred dhcpd[7367]: DHCPREQUEST for 10.50.100.100 (10.50.0.1) from 00:16:d3:39:2e:69 (batmobil) via eth0
Sep  3 07:09:12 alfred dhcpd[7367]: DHCPACK on 10.50.100.100 to 00:16:d3:39:2e:69 (batmobil) via eth0
Sep  3 07:09:12 alfred dhcpd[7367]: Added new forward map from batmobil.lan.bat to 10.50.100.100
Sep  3 07:09:12 alfred named[7393]: client 127.0.0.1#7429/key rndc-key: updating zone '10.IN-ADDR.ARPA/IN': update failed: not authoritative for update zone (NOTAUTH)
Sep  3 07:09:12 alfred dhcpd[7367]: DDNS: bad zone information, repudiating zone 50.10.in-addr.arpa.
Sep  3 07:09:12 alfred dhcpd[7367]: DDNS: Failed to retry after zone failure
Sep  3 07:09:12 alfred dhcpd[7367]: Unable to add reverse map from 100.100.50.10.in-addr.arpa. to batmobil.lan.bat: failure

From my search I learned that the message from named update failed: not authoritative for update zone (NOTAUTH) points to the DHCP server who is not authoritative. Even though I believe to have identified the problem (please tell me if I am wrong), I cannot get it fixed. So my question is: How do I configure the dhcp/bind to get reverse mappings?

已采纳解答

原帖链接 · Håkan Lindqvist · CC BY-SA 3.0

The zones in the BIND config are misspelled, eg 50.10.in-addr-arpa instead of 50.10.in-addr.arpa.

Also, you should consider creating a separate TSIG key for this purpose instead of misusing the key for rndc in a wildly different context.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2017-09-03)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。