OPNsense Forum

Archive => 21.7 Legacy Series => Topic started by: _richii on July 17, 2021, 12:20:55 AM

Title: [SOLVED] 21.7RC2 Unbound adv. configuration files not surviving service restart
Post by: _richii on July 17, 2021, 12:20:55 AM
After the Unbound custom options were removed in RC2, I tried to apply my custom configuration through the "new" way described here: https://docs.opnsense.org/manual/unbound.html#advanced-configurations

But after a Unbound service restart via GUI all added configuration files in the directory /var/unbound/etc/ got deleted.

I even tried out the template generation variant, even though I don't use a memory file system for /var in my configuration.
After the command "configctl template reload sampleuser/Unbound" the template custom configuration file gets indeed added, but after another Unbound service restart it gets deleted again.

It seems there is a bug that removes all non default configuration files on Unbound service start.
Title: Re: 21.7-RC2 Unbound advanced configuration files not surviving service restart
Post by: opnfwb on July 17, 2021, 05:36:56 AM
The hint for me was in the new release for RC2: https://forum.opnsense.org/index.php?topic=23926.0

If you place the custom.conf in this folder it should survive service restarts and system reboots: /usr/local/etc/unbound.opnsense.d

I've tested the above running an RC2 VM in my lab and it is working as expected.
Title: Re: 21.7-RC2 Unbound advanced configuration files not surviving service restart
Post by: mimugmail on July 17, 2021, 06:29:56 AM
https://github.com/opnsense/docs/blob/master/source/manual/unbound.rst

Docs are already updated but get released with 21.7
Title: Re: 21.7-RC2 Unbound advanced configuration files not surviving service restart
Post by: _richii on July 17, 2021, 11:23:39 AM
Oh, it seems I missed that hint in the release notes.
It is working now, Thank You!

May I suggest a versioning in the Sphinx docs at docs.opnsense.org?
That way you could select the development release there and be apprised of all changes that comes with it without having to check out Github for documentation changes.
Title: Re: [SOLVED] 21.7RC2 Unbound adv. configuration files not surviving service restart
Post by: franco on July 17, 2021, 02:37:57 PM
We have discussed branches in the docs but haven't concluded splitting it up per release because of limited resources.

The move of the configuration directory was necessary for DNSBL data to be available at boot for /var MFS users since /var/unbound is also on the MFS because of it and there the contents would be cleared on boot anyway.

It's a bit more consistent now.


Cheers,
Franco