PiHole not able to block ads properly after Unbound installation

Please follow the below template, it will help us to help you!

If you are Experiencing issues with a Pi-hole install that has non-standard elements (e.g you are using nginx instead of lighttpd, or there is some other aspect of your install that is customised) - please use the Community Help category.

Expected Behaviour:

Pi Hole isnt able to block ads even thought queries and such seem to show that some ads are being blocked. But after Unbound instllation, the amount of blocks have been heavily reduced.

Actual Behaviour:

I recently installed PI hole and Unbound on my Raspberry Pi. It seemed to work pretty well until I added Unbound to the mix.

I have a TP router and followed their own guide regarding the PI hole ( How to use Pi-Hole DNS Server on TP-Link routers). But I belive there is something wrong in here which im not able to find.

Debug Token:

https://tricorder.pi-hole.net/zbCHAj8H/

Thank you

I would like to add the following after booting some units at home.

Devices that were connected to the PiHole before the Unbound installation seem to have the ads blocked.

Devices that were connected after Unbound installation have ads all over the place..

Please post the output of the following command from the Pi terminal:

sudo grep -v '#\|^$' -R /etc/unbound/unbound.conf*

Thank you for taking your time.

Following output is shown:
li@raspberrypi:~ $ sudo grep -v '#|^$' -R /etc/unbound/unbound.conf*
/etc/unbound/unbound.conf:include-toplevel: "/etc/unbound/unbound.conf.d/*.conf"
/etc/unbound/unbound.conf.d/resolvconf_resolvers.conf:forward-zone:
/etc/unbound/unbound.conf.d/resolvconf_resolvers.conf: name: "."
/etc/unbound/unbound.conf.d/resolvconf_resolvers.conf: forward-addr: 192.168.0.175
/etc/unbound/unbound.conf.d/resolvconf_resolvers.conf: forward-addr: 192.168.0.1
/etc/unbound/unbound.conf.d/root-auto-trust-anchor-file.conf:server:
/etc/unbound/unbound.conf.d/root-auto-trust-anchor-file.conf: auto-trust-anchor-file: "/var/lib/unbound/root.key"
/etc/unbound/unbound.conf.d/pi-hole.conf:server:
/etc/unbound/unbound.conf.d/pi-hole.conf: verbosity: 0
/etc/unbound/unbound.conf.d/pi-hole.conf: interface: 127.0.0.1
/etc/unbound/unbound.conf.d/pi-hole.conf: port: 5335
/etc/unbound/unbound.conf.d/pi-hole.conf: do-ip4: yes
/etc/unbound/unbound.conf.d/pi-hole.conf: do-udp: yes
/etc/unbound/unbound.conf.d/pi-hole.conf: do-tcp: yes
/etc/unbound/unbound.conf.d/pi-hole.conf: do-ip6: no
/etc/unbound/unbound.conf.d/pi-hole.conf: prefer-ip6: no
/etc/unbound/unbound.conf.d/pi-hole.conf: harden-glue: yes
/etc/unbound/unbound.conf.d/pi-hole.conf: harden-dnssec-stripped: yes
/etc/unbound/unbound.conf.d/pi-hole.conf: use-caps-for-id: no
/etc/unbound/unbound.conf.d/pi-hole.conf: edns-buffer-size: 1232
/etc/unbound/unbound.conf.d/pi-hole.conf: prefetch: yes
/etc/unbound/unbound.conf.d/pi-hole.conf: num-threads: 1
/etc/unbound/unbound.conf.d/pi-hole.conf: so-rcvbuf: 1m
/etc/unbound/unbound.conf.d/pi-hole.conf: private-address: 192.168.0.0/16
/etc/unbound/unbound.conf.d/pi-hole.conf: private-address: 169.254.0.0/16
/etc/unbound/unbound.conf.d/pi-hole.conf: private-address: 172.16.0.0/12
/etc/unbound/unbound.conf.d/pi-hole.conf: private-address: 10.0.0.0/8
/etc/unbound/unbound.conf.d/pi-hole.conf: private-address: fd00::/8
/etc/unbound/unbound.conf.d/pi-hole.conf: private-address: fe80::/10

see WARNING: Raspbian October 2021 release bullseye + unbound - General / Customizing Pi-hole - Pi-hole Userspace (reading material).

solution: follow the steps in the documentation

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

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

  1. Delete the unwanted unbound configuration file:

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

  1. Restart unbound:

sudo service unbound restart

1 Like

Thank you for this.

I've followed your steps and so far it seems to work. I will try to connect another new device when I'm able to this weekend.

May I ask what exactly these command did to my build?

Thank you once again

commenting out the line in /etc/resolvconf.conf ensures /etc/unbound/unbound.conf.d/resolvconf_resolvers.conf is never created again.

/etc/unbound/unbound.conf.d/resolvconf_resolvers.conf was added to raspbian Bullseye under the false assumption that unbound would be the primary resolver for the system, and not, as pi-hole uses it, as recursive upstream for pihole-FTL. I've read somewhere that in the next version of raspbian (Bookworm) this will be removed (not confirmed).

1 Like

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