Unbound Breaks After Reboot

Good Day Gents,

not a najor problem but more of an anoying one .this is on a clean os install on my pi 4

my pihole is setup as a recursive dns works great till next reboot now what happens is

this file gets created @ unbound config folder resolvconf_resolvers.conf

has a forwarding address in it tha brakes the recursive dns deleting the file and restarting unbound solves the problem till i reboot and that file gets created again.

resolvconf is disabled not sure what is creating that specific file

This forwarding configuration was installed by Bullseye through resolvconf.

Edit file /etc/resolvconf.conf and comment out the last line which should read:

unbound_conf=/etc/unbound/unbound.conf.d/resolvconf_resolvers.conf

Delete the unwanted unbound configuration file:

sudo rm /etc/unbound/unbound.conf.d/resolvconf_resolvers.conf

restart unbound:

sudo service unbound restart

awesome thank you :slight_smile:

I'm curious if this always needs to be done? I have the same files but don't have @AfTaStER's issue, my conf has no addresses in it.

$ cat /etc/unbound/unbound.conf.d/resolvconf_resolvers.conf
# Generated by resolvconf
$ cat /etc/resolvconf.conf
...
dnsmasq_resolv=/var/run/dnsmasq/resolv.conf
pdnsd_conf=/etc/pdnsd.conf
unbound_conf=/etc/unbound/unbound.conf.d/resolvconf_resolvers.conf

I followed the steps to disable the unbound resolvconf service and then manually populated /etc/resolv.conf with my Pi's desired external nameservers, then tested it stayed like this across reboots, which it does.

I've not touched the native OS resolvconf – should I be similarly doing the steps in this solution to ensure no surprises down the line?

Yes for no surprises.

I only ask because it's not mentioned on the Pi-hole Unbound installation page in the section which talks about optionally turning off Unbound's own resolvconf service.

You are in a maze of twisty little DNS resolvers, all alike. :sunglasses:

1 Like

Was not aware of this as well since my previous pihole install on debian 10 had no such suprises xD

Thats bc on the Buster release, the path was different and didnt effect Unbound:

pi@ph5a:~ $ lsb_release -d
Description:    Raspbian GNU/Linux 10 (buster)
pi@ph5a:~ $ cat /etc/resolvconf.conf
[..]
unbound_conf=/var/cache/unbound/resolvconf_resolvers.conf

It has to do with the newer version of openresolv on Bullseye.

Buster:

pi@ph5a:~ $ apt policy openresolv
openresolv:
  Installed: 3.8.0-1

Vs Bullseye:

pi@ph5b:~ $ apt policy openresolv
openresolv:
  Installed: 3.12.0-1

FYI:

pi@ph5b:~ $ man resolvconf.conf
[..]
     unbound_conf
             This file tells unbound about specific and global name
             servers.

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