Using nsupdate in scripts

Philip Prindeville philipp_subx at redfish-solutions.com
Mon Mar 14 01:36:06 UTC 2022


Hi all,

I have some scripting that generates zone files for RFC-1918 addresses for the DHCP static reservations when isc-dhcp starts up on OpenWRT:

https://github.com/openwrt/packages/blob/master/net/isc-dhcp/files/dhcpd.init#L551-L583

I push the single monolithic file over here:

https://github.com/openwrt/packages/blob/master/net/isc-dhcp/files/dhcpd.init#L585

But I've noticed that since I added the following to my options { }:

        allow-transfer { none; };
        dnssec-validation auto;
        listen-on-v6 { none; } ;

That I get a *lot* of lines like:

; Communication with ::1#53 failed: connection refused

(One per RR in the monolithic file, in fact) when I run "nsupdate -l -v $dyn_file".

If I run "nsupdate -4 -l -v $dyn_file" then all of that goes away.  This will always be a local update.

What's the cleanest/most-scriptable way to detect if I should be passing "-4" or "-6" explicitly to "nsupdate"?

Where does nsupdate get his configuration to know what port to talk to the name server on?  Does he also use the "options" section from /etc/bind/named.conf?

Thanks,

-Philip



More information about the bind-users mailing list