When first enabling DNS Resolver the test of the config fails
The current code in 2.3 tries to generate unbound.test.conf but with various references to "real" files in it like access_lists.conf and so on. If unbound is already up and running then those "real" files exist and the validation of unbound.test.conf passes. But if it is the very first time enabling unbound, then those files may not exist and the validation reports errors like in this forum post:
Fix #5767 config validation errors when first enabling DNS Resolver
Generate a complete set of test conf files in /var/unbound/test subdir when doing the validation of the tentative config that is being saved.
This avoids any dependency on any of the "real" files already existing in /var/unbound and also avoids the chance of overwriting a live file that is currently in use by the running unbound.
/var/unbound/test is removed once the validation has been done.
The real unbound conf files are created in /var/unbound like they always were after the user presses apply.
#3 Updated by Phillip Davis over 3 years ago
Feedback from forum is good: https://forum.pfsense.org/index.php?topic=105236.msg586850#msg586850