On 2019-07-05, Paco Esteban <[email protected]> wrote: > On Fri, 05 Jul 2019, Marko Cupać wrote: > >> Hi, >> >> I have a bunch of branch offices whose gateways (OpenBSD on APU) connect >> to 'net via PPPoE and obtain their dynamic public IP addresses from >> ISPs. Is there a way for them to update remote bind zone every time IP >> changes so I have their current public IP in DNS? > > I've used bind's nsupdate in the past to do something like this (not on > dynamic ip change, but on provisioning vms but quite similar). > > It was some time ago but, iirc the provisioning scripts uploaded some > file like this: > > update add $FULL_DNS_NAME. 300 A $INT_IP > send > > and then executed nsupdate. I guess you can do something similar with > cron jobs. > > But there's probably an easier/more reliable option.
nsupdate is expected to be reliable. The easy option is to outsource to an external service (there are plenty of clients in /usr/ports/net). But if you want to run it yourself BIND+nsupdate is probably about the easiest way, search for e.g. "nsupdate own dynamic dns", you will find multiple examples. You will want to reserve a zone (separate file) for the nsupdate-managed names rather than having it as part of your main domain.

