[solved] error message using custom options in DNS Resolver with unbound
-
I'm attempting to add a list of host overrides via the 'custom options' section of the DNS Resolver, but seem to have a problem…
This is on a new install of 2.3.3 (amd64 full install).
In particular I'm following the guidance offered in this post: https://forum.pfsense.org/index.php?topic=112335.0 (which although a little dated now, was for pfsense 2.3). As the post suggested I've created the individual host overides no problem and they work fine, but after creating the list of google URLs as a list in a file: /var/unbound/forcegoogle.conf when I try to reference that file in DNS Resolver---> custom options, using: "server:include: /var/unbound/forecegoogle.conf"
I get this message:The following input errors were detected: The generated config file cannot be parsed by unbound. Please correct the following errors: /var/unbound/test/unbound.conf:89: error: cannot open include file '/var/unbound/forecegoogle.conf': No such file or directory read /var/unbound/test/unbound.conf failed: 1 errors in configuration file
(from what I can see there is no "/test/" directory under /var/unbound/)
I've noted this discussion: https://redmine.pfsense.org/issues/6072 but see that the way the file is referenced in 'custom options' uses this approach already (yes?)
sorry if this is a stupid noob enquiry, but wondering what I'm doing wrong…
-
Wondering if my issue related to this post: https://forum.pfsense.org/index.php?topic=118226.0
This looks a similar problem:
So from the code it looks like that sub dir is created but then removed after the test
function test_unbound_config($unboundcfg, &$output) { global $g; $cfgsubdir = "/test"; unbound_generate_config($unboundcfg, $cfgsubdir); unbound_remote_control_setup($cfgsubdir); do_as_unbound_user("unbound-anchor", $cfgsubdir); $cfgdir = "{$g['unbound_chroot_path']}{$cfgsubdir}"; $rv = 0; exec("/usr/local/sbin/unbound-checkconf {$cfgdir}/unbound.conf 2>&1", $output, $rv); rmdir_recursive($cfgdir); return $rv; }
rmdir_recursive($cfgdir);
So something is failing here? Just not sure what..
-
what perm are the file?
-
Check the name of the file as there is a spelling mistake in the filename. The test folder is created and deleted after hitting "apply".
-
THANKS guys for the prompt responses. Sorted!
BBcan177 - full marks for spotting the typo which, despite me thinking I had checked for obvious things like that, passed me by.
Should I flag that on the guide post I referred to (which is where the error came from), or would that be considered necroposting?