[Pdns-users] Adjusting slaves via API
Otto Moerbeek
otto at drijf.net
Tue Mar 15 06:58:21 UTC 2022
On Tue, Mar 15, 2022 at 07:46:24PM +1300, Pieter De Wit wrote:
> Hi Otto,
>
> I have a server that is the master for “example.com <http://example.com/>” - we are dynamically allocating slaves on DHCP. I would like the master to send notify messages when the zone is changed to this list of dynamic slaves. The only way I can see of doing this is to “register” the slaves via the API ?
>
> Hope that expands what I am trying to do ?
A slave knows its master(s) using the information set when
creating/modyfying the zone, using the values in the "master" property.
A master determines which IPs to send notifies to using the NS records
in the zone and the IPs they resolve to. Additionally the value(s) of
the meta key ALSO-NOTIFY is used to determine IPs to send notifies to.
So if you add/modify a slave, adjusting the NS records and their IPs on
the master should do it, or alternatively modifying the ALSO-NOTIFY
meta key of the zone.
Don't forget to also allow AXFR to you slaves via the ALLOW-AXFR-FROM
meta value.
Both meta values can also be set globally for all zones using the settings
allow-axfr-ips and also-notify.
-Otto
>
> Thanks !
>
> > On 15/03/2022, at 19:37, Otto Moerbeek <otto at drijf.net> wrote:
> >
> > On Tue, Mar 15, 2022 at 03:11:43PM +1300, Pieter De Wit via Pdns-users wrote:
> >
> >> Hi All,
> >>
> >> I was wondering if there is a way to list/adjust the slaves of a zone via the API ?
> >>
> >> Thanks,
> >>
> >> Pieter
> >
> > yes, see
> >
> > https://docs.powerdns.com/authoritative/http-api/zone.html#put--servers-server_id-zones-zone_id
> >
> > and other REST calls on that page. If you have a more specific
> > question, ask.
> >
> > -Otto
> >
> >
> >
>
More information about the Pdns-users
mailing list