I have most of a dynamic dns set up working. I can manually update the DNS entries using nsupdate
and my dhcpd.conf file will attempt to set the DNS entries.
However this fails as I don't have bind running on a standard port, I have unbound running on port 53 so I get the error.
dhcpd: Unable to add forward map from XXX to 192.168.0.19: NOTIMP
which is expected.
What I would like to do is get dhcpd to be able to talk to my bind server on the non standard port.
I have tried
zone myzone. {
primary 192.168.0.125:5252;
}
and
zone myzone. {
primary 192.168.0.125 5252;
}
and
zone myzone. {
primary 192.168.0.125;
port 5252;
}
None of which seem to work.
is there a way to specify a port for the DNS server?
I am updating on the same machine so I'm not using zone files, but I know the updates can work if on the correct port because of testing with nsupdate.
You are not detailing your OS so I'm assuming Linux.
dhcpd does not appear to have an option or parameter for customizing the ddns server port, at least it's not in any man page I have seen.
An option therefore could be to use iptables (or whatever firewall you have) to rewrite outbound packets to your dns server udp/53 or tcp/53, to the port it is really listening on.
An answer on how to do that is provided in this question on Stackoverflow: https://stackoverflow.com/questions/242772/using-iptables-to-change-a-destination-port
It is possible you could fine-grain it even further by only rewriting outbound packets from processes owned by the particular user running your dhcpd process. This is apparently possible using the iptables --uid-owner directive.