Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    [solved] error message using custom options in DNS Resolver with unbound

    Scheduled Pinned Locked Moved DHCP and DNS
    5 Posts 3 Posters 1.9k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • R
      revmarkp
      last edited by

      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…

      1 Reply Last reply Reply Quote 0
      • R
        revmarkp
        last edited by

        Wondering if my issue related to this post: https://forum.pfsense.org/index.php?topic=118226.0

        This looks a similar problem:

        @johnpoz:

        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..

        1 Reply Last reply Reply Quote 0
        • johnpozJ
          johnpoz LAYER 8 Global Moderator
          last edited by

          what perm are the file?

          An intelligent man is sometimes forced to be drunk to spend time with his fools
          If you get confused: Listen to the Music Play
          Please don't Chat/PM me for help, unless mod related
          SG-4860 24.11 | Lab VMs 2.8, 24.11

          1 Reply Last reply Reply Quote 0
          • BBcan177B
            BBcan177 Moderator
            last edited by

            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".

            "Experience is something you don't get until just after you need it."

            Website: http://pfBlockerNG.com
            Twitter: @BBcan177  #pfBlockerNG
            Reddit: https://www.reddit.com/r/pfBlockerNG/new/

            1 Reply Last reply Reply Quote 0
            • R
              revmarkp
              last edited by

              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?

              1 Reply Last reply Reply Quote 0
              • First post
                Last post
              Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.