I believe I have mis-named my unbound.conf file, to pi-hole.conf inside the unbound directory

Hello,

I understand I post quite a bit, some days I may not post as much, but with free time, may as well brush up on these tools.

So, I have a pi-hole.conf file inside of my unbound directory. I don't believe this is traditional, and I may have named it unintentionally.

So, the path the pi-hole.conf is:

/etc/pihole/pihole-FTL.conf

unbound conf file name:

/etc/unbound/unbound.conf.d/pi-hole.conf

I can't imagine this makes any sense, especially not to me. In that unbound folder, I have option in my file such as

loopback IP

and

port: number (for unbound)

dnssec

prefetch

num-threads

So this is clearly for unbound. So what would be an appropriate filename, as

/etc/unbound/unbound.conf

Just has a few lines in comments, and

include-toplevel: "/etc/unbound/unbound.conf.d/*.conf"

I find this slightly confusing, but I think I can just rename this to

unbound.conf, inside the conf.d folder, would this be a workable solution?

Not necessary.
You can read about these additional config files that will be loaded/included on unbound startup, like for example that pi-hole.conf file, on the man page:

pi@ph5b:~ $ man unbound.conf
[..]
FILE FORMAT
       There  must be whitespace between keywords.  Attribute keywords end
       with a colon ':'.  An attribute is followed by a value, or its con‐
       taining  attributes  in  which  case it is referred to as a clause.
       Clauses can be repeated throughout the file (or included files)  to
       group attributes under the same clause.

       Files  can  be included using the include: directive. It can appear
       anywhere, it accepts a single file name  as  argument.   Processing
       continues as if the text from the included file was copied into the
       config file at that point.  If also using chroot, using  full  path
       names  for the included files works, relative pathnames for the in‐
       cluded names work if the directory  where  the  daemon  is  started
       equals  its chroot/working directory or is specified before the in‐
       clude statement with directory: dir.  Wildcards can be used to  in‐
       clude multiple files, see glob(7).

       For  a more structural include option, the include-toplevel: direc‐
       tive can be used.  This closes whatever clause is currently  active
       (if  any)  and  forces the use of clauses in the included files and
       right after this directive.

This isn't in an unbound directory. This is the correct location and name for the FTL configuration file.

This is the correct location and name for the unbound configuration file we provide in our guide.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.