<html><body><div style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10pt; color: #000000"><div>Hi Frank,</div><div><br data-mce-bogus="1"></div><div>Intercepting the NOTIFYs with a script sounds like a good idea but can this be done with PowerDNS?</div><div>Or do you mean writing a custom script that acts a a notify proxy/filter?</div><div><br data-mce-bogus="1"></div><div>Thanks </div><div><br></div><hr id="zwchr" data-marker="__DIVIDER__"><div data-marker="__HEADERS__"><b>From: </b>"pdns-users" <pdns-users@mailman.powerdns.com><br><b>To: </b>"pdns-users" <pdns-users@mailman.powerdns.com><br><b>Sent: </b>Thursday, May 23, 2019 10:08:43 AM<br><b>Subject: </b>Re: [Pdns-users] Postfix as master+slave. How to prevent supermasters from being able to create subzones for NATIVE domains?<br></div><br><div data-marker="__QUOTED_TEXT__">Hi Sander,<div class=""><br class=""></div><div class="">Do you want this for a fixed set of “<a href="http://domain.com" class="" target="_blank">domain.com</a>” domains or for “any domain that is configured in pdns as a native domain”?</div><div class=""><br class=""></div><div class="">If the first, have a look at the LUA-AXFR-SCRIPT functionality. You define a (lua) script that gets executed after the AXFR has been done, but before the domain is committed to the backend. You could block the commit by returning an error. See my blog post <a href="https://www.frank.be/when-your-notify-wont-work/" class="" target="_blank">https://www.frank.be/when-your-notify-wont-work/</a> where I used the LUA-AXFR-SCRIPT functionality for a different use case.</div><div class=""><br class=""></div><div class="">However, this won’t prevent the domain from being written to the domains table in the backend, so you’d have to lab what happens in your version of pdns if you get the desired behaviour. Also note that you need to define the script on a per-domain level. So you’d need another mechanism to update the backend for each newly discovered domain. (Database trigger might help).</div><div class=""><br class=""></div><div class="">Another option would be to intercept the NOTIFYs with a script, check if the zone you receive the notify for matches the <a href="http://sub.domain.com" class="" target="_blank">sub.domain.com</a> regexp, query the pdns master for a SOA for <a href="http://domain.com" class="" target="_blank">domain.com</a>, then then either drop the notify, or pass it to your pdns instance.</div><div class=""><br class=""></div><div class="">Kind Regards,</div><div class=""><br class=""></div><div class="">Frank Louwers</div><div class="">PowerDNS Certified Consultant @ <a href="http://Kiwazo.be" class="" target="_blank">Kiwazo.be</a></div><div class=""><br class=""><div class=""><div><blockquote class=""><div class="">On 23 May 2019, at 07:54, <a href="mailto:sandermoors@telenet.be" class="" target="_blank">sandermoors@telenet.be</a> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class=""><div style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10pt;" class=""><div class="">Hi,</div><div class=""><br class=""></div><div class="">We have a DirectAdmin server which internally is using a BIND nameserver. We also have a PowerDNS server which is acting as a master for domains configured as NATIVE and it's also acting as a slave for the domains added in DirectAdmin.</div><div class="">This is done by configuring the IP address of the DirectAdmin server in the supermasters table. All workin as expected.</div><div class=""><br class=""></div><div class="">Now, we noticed that if we configure "<a href="http://domain.com" class="" target="_blank">domain.com</a>" as a NATIVE domain in PowerDNS it is still possible to configure "<a href="http://sub.domain.com" class="" target="_blank">sub.domain.com</a>" in DirectAdmin and powerdns will accept the subzone from the supermaster.</div><div class="">This way users on our DirectAdmin server can break configurations for domains configured as NATIVE.</div><div class=""><br class=""></div><div class="">We need a way for PowerDNS to reject all *.<a href="http://domain.com" class="" target="_blank">domain.com</a> subzones from any supermaster if the main domain is configured as NATIVE.</div><div class=""><br class=""></div><div class="">Is there a way to do this?</div><div class=""><br class=""></div><div class="">Thanks</div><div class=""><br class=""></div><div class="">Sander</div></div></div>_______________________________________________<br class="">Pdns-users mailing list<br class=""><a href="mailto:Pdns-users@mailman.powerdns.com" class="" target="_blank">Pdns-users@mailman.powerdns.com</a><br class=""><a href="https://mailman.powerdns.com/mailman/listinfo/pdns-users" class="" target="_blank">https://mailman.powerdns.com/mailman/listinfo/pdns-users</a><br class=""></div></blockquote></div><br class=""></div></div><div class=""></div><br>_______________________________________________<br>Pdns-users mailing list<br>Pdns-users@mailman.powerdns.com<br>https://mailman.powerdns.com/mailman/listinfo/pdns-users<br></div></div></body></html>