我在使用powerdns for ddns实现isc-dhcp时遇到了麻烦,无论我更改了多少次配置,它总是返回这个错误"Unable to add forward map from to : operation canceled“
然后出现这个"Unable to add forward map from to :Unable error“。
这是我的dhcpd.conf文件
authoritative;
log-facility local7;
key dhcp-key {
algorithm hmac-sha256;
secret "some comfusing scramble alphabet and number and symbol ass well";
};
default-lease-time 720000;
max-lease-time 2160000;
ddns-updates on;
ddns-update-style interim;
update-static-leases on;
ping-check true;
ddns-domainname "gwusers.lan";
ddns-rev-domainname "in-addr.arpa.";
zone gwusers.lan. {
primary 192.168.183.111;
key dhcp-key;
}
shared-network user-ip {
subnet 172.17.183.0 netmask 255.255.255.0 {
option routers 172.17.183.254;
option domain-name-servers 192.168.183.111, 192.168.183.222;
option domain-search "mycomp.local";
pool {
#one-lease-per-client true;
ping-check true;
range 172.17.183.1 172.17.183.229;
}
zone 183.17.172.in-addr.arpa. {
primary 192.168.183.111;
key dhcp-key;
}
}
subnet 172.21.183.0 netmask 255.255.255.0 {
option routers 172.21.183.254;
option domain-name-servers 192.168.183.111, 192.168.183.222;
option domain-search "mycomp.local";
pool {
#one-lease-per-client true;
ping-check true;
range 172.21.183.1 172.21.183.229;
}
zone 183.21.172.in-addr.arpa. {
primary 192.168.183.111;
key dhcp-key;
}
}
}在我的pdns.conf
我启用了"dnsupdate=yes“和"allow-dnsupdate-from=”
我遵循了这本指南,但似乎一点也不管用。
注: dhcp-server (Centos 8 with dhcpd version为4.3.6)和dns server (centos 7 with pdns version为4.3.0)不在同一台机器下,我已经分开安装了。
有人知道怎么解决这个问题吗?
发布于 2020-09-17 07:05:39
好吧,我自己找到了解决方案,所以我要回答这个问题,我的powerdns授权服务器运行在不同的端口上,因为我在同一台机器上运行powerdns-recursor作为powerdns授权服务器。因此,解决方案是添加另一个NIC,并将另一个ip分配给新NIC,这样问题就解决了。
发布于 2021-11-27 15:00:05
我在端口53上运行powerdns-recursor并阻止来自isc-dhcp-server的动态dns更新时也遇到了同样的问题。我没有将powerdns authoritative绑定到Ardi解决方案中的另一个NIC,而是将输出流量从端口53转发到运行我的powerdns authoritative的端口54。
这可以通过以下命令来完成。通过将dhcpd所有者添加到规则,仅为dhcpd进程转发流量。替换为运行powerdns授权dns服务器的ip地址。
iptables -t nat -A OUTPUT -p udp --dport 53 -m owner --uid-owner dhcpd -j DNAT --to-destination <destionation-ip>:54
iptables -t nat -A OUTPUT -p tcp --dport 53 -m owner --uid-owner dhcpd -j DNAT --to-destination <destination-ip>:54https://stackoverflow.com/questions/63922043
复制相似问题