1
24.1 Legacy Series / Re: bind plugin: 'update-policy' is not allowed in 'secondary' zone
« on: March 27, 2024, 07:51:05 am »
Sorry I then I did not explain myself properly.
I have a bunch of secondary configured in the BIND Plugin. If I make a change through the web interface, the named.conf file at /usr/local/etc/namedb/named.conf will be regenerated from the /usr/local/opnsense/service/templates/OPNsense/Bind/named.conf template.
/usr/local/bin/named does not allow updates on the secondary zone as they should be done to the primary zone. Hence named throws an error:
In the secondary zone configuration block, 'update-policy' seems not to be allowed - this is a snippet from the generated name.conf file:
Here is the patch that fixes it:
I'll create an issue for this bug.
https://github.com/opnsense/plugins/issues/3874
Thanks,
- Brendan
I have a bunch of secondary configured in the BIND Plugin. If I make a change through the web interface, the named.conf file at /usr/local/etc/namedb/named.conf will be regenerated from the /usr/local/opnsense/service/templates/OPNsense/Bind/named.conf template.
/usr/local/bin/named does not allow updates on the secondary zone as they should be done to the primary zone. Hence named throws an error:
/usr/local/etc/namedb/named.conf:93: option 'update-policy' is not allowed in 'secondary' zone 'xx.xx.xx.in-addr.arpa'
In the secondary zone configuration block, 'update-policy' seems not to be allowed - this is a snippet from the generated name.conf file:
zone "xx.xx.xx.in-addr.arpa" {
type secondary;
primaries { yy.yy.yy.yy key "key.dyn.zz.zz.zz"; };
file "/usr/local/etc/namedb/secondary/xx.xx.xx.in-addr.arpa.db";
allow-transfer {
ns_notify;
};
allow-query {
ns_query;
};
update-policy {
grant rndc-key zonesub ANY;
};
};
Here is the patch that fixes it:
Y@Z:/usr/local/opnsense/service/templates/OPNsense/Bind % diff named.conf.org named.conf
183c183
< {% if domain.allowrndcupdate is defined and domain.allowrndcupdate == "1" %}
---
> {% if domain.allowrndcupdate is defined and domain.allowrndcupdate == "1" and domain.type != 'secondary' %}
I'll create an issue for this bug.
https://github.com/opnsense/plugins/issues/3874
Thanks,
- Brendan