os-bind: Apply silently loses newly added static records on dynamic zones (allowrndcupdate)
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- php
- Domain
- backend, networking
Research direction
Start by tracing the BIND reconfigure action that reloads the OPNsense/Bind template and restarts named, then inspect the zone model and generated master-file path described in the report. Check how dynamic zones with allowrndcupdate are handled during Apply and compare that with ISC's documented dynamic-zone edit cycle. Done when a static record remains in the master file and answers after Apply on a zone with dynamic updates.
Written by the indexing model from the issue text.
Description
Bug summary
Adding a static record to a dynamic zone (one with Allow RNDC update / allowrndcupdate enabled, e.g. receiving Kea DDNS updates via RFC 2136) through the GUI and pressing Apply results in the new record being silently lost. The GUI reports success, but the record never answers.
Root cause (verified on os-bind 1.34_4, OPNsense 26.7)
The reconfigure action performs, in order:
template reload OPNsense/Bind→ regenerates the zone master file from the model (contains only static records),configctl bind restart→rc.d/named restart.
On stop, named flushes its in-memory zone state (old statics + dynamic journal content, without the new record) over the freshly generated master file. On start, named loads that dumped file. The newly added static record is gone.
If the zone is not dirty (no dynamic updates since load, e.g. zones without DDNS) named does not dump, the generated file survives, and Apply works — which is why this only hits dynamic zones.
Steps to reproduce
- Create a primary zone, enable Allow RNDC update (allowrndcupdate), have a DHCP server (Kea) register dynamic records via RFC 2136 so the zone has a journal and is "dirty".
- GUI → Services → BIND → Records → add a new static A record → Apply.
- Query the new name (e.g.
dig @<firewall> newrecord.<zone>) → NXDOMAIN / no answer. - The record is also absent from the master file on disk (
/usr/local/etc/namedb/primary/<zone>.db) after Apply.
Expected: record persists and answers after Apply.
Suggested fix
For zones with allowrndcupdate enabled, the reconfigure should follow ISC's documented edit cycle for dynamic zones before regenerating templates: rndc freeze <zone> → regenerate → rndc reload/rndc thaw (or at minimum rndc sync -clean before the template reload), so the dumped state cannot overwrite the freshly generated master file.
Workarounds in the meantime
- Apply twice (second Apply loads the record because the zone is no longer dirty in that window — racy if new DDNS updates arrive in between), or
- keep DHCP-registered names in a separate zone.
Environment
- OPNsense 26.7 (FreeBSD 15.1-RELEASE-p6)
- os-bind 1.34_4
- BIND 9.20.30
- Kea DHCP (core) doing RFC 2136 DDNS into the affected zone
Reported by: Daniel Ortiz [email protected]
- Dominant language
- PHP
- Stars
- 1.2k
- Forks
- 926
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 25
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from opnsense/plugins
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
opnsense/plugins#5976 · 1 comment ·
Maintainers usually reply within 1 day
-
net/haproxy: IPv6 literal in real server "Source address" generates an invalid `source` directiveOpenincomplete
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
opnsense/plugins#5973 · 1 comment ·
Maintainers usually reply within 1 day
-
[dns/ddclient] Support hiding unused standard fields per service (optional_hiding)Possibly taken @bringha1 claimed this 1 day ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
q-feeds-connector: "error in configd communication" every update when the Unbound DNSBL rebuild takes longer than 120sPossibly taken @mhatipog claimed this 9 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
All issues in opnsense/plugins
Similar issues
-
15.0
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
open-telemetry/opentelemetry-php-distro#176 ·
Maintainers usually reply within 2 days
-
No Code Attached Yet
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
joomla/joomla-cms#48941 ·
Maintainers usually reply within 1 day
-
needs-triage Platform(Default)
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
bug new
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
moodle-an-hochschulen/moodle-theme_boost_union#1500 ·
Maintainers usually reply within 1 day