PiHole & systemd-resolved

With manifest v3 looming, I thought I would have a play with pihole in a docker container. This is what I have done so far:

https://bbs.archlinux.org/viewtopic.php?id=275976

cd /etc/  
sudo cp /etc/resolv.conf /etc/resolv.conf.bak
sudo rm -f resolv.conf 
sudo ln -s ../run/systemd/resolve/stub-resolv.conf resolv.conf 
sudo systemctl restart systemd-resolved 
cd -

## Also:
sudo cp /etc/systemd/resolved.conf /etc/systemd/resolved.conf.bak
sudo sed --in-place "s/^#DNSStubListener=yes$/DNSStubListener=no/g" /etc/systemd/resolved.conf
sudo systemctl restart systemd-resolved
## also had to:
sudo nano /etc/nginx/nginx.conf     
## Changed line 36 from 80 to 81

If I turn systemd-resolved off (and reboot):

I need systemd-resolved for wireguard (Azire), been at this all morning, so any ideas gratefully accepted :smiley:

I’ve used pihole for a while on an dedicated NanoPi Neo SBC, which was running a headless DietPi Installation. But never within a docker container. I’ve routed all the DNS traffic in my home network over it and it worked quite well, most of the time.

In the end, as there are several public DNS servers around that provide either DoH or DoT access, they also include content blocking, which is much easier to handle and one system less which needs to be maintained.

Cloudflare offers some, Mullvad DNS servers are available for everyone, no account needed. Quad9 includes adblocking by default, NextDns also offers some options.

Think I have sorted, removed systemd-resolvconf and installed openresolv and everything now works.

Extended testing and no issues, will mark as solved.