Problem: port 53 conflict between systemd.resolved and pihole in the pihole-dnscrypt docker
Setup: pi 4, ubuntu 20.04.2 (clean install)
Guides for install:
(1) https://github.com/losuler/pihole-dnscrypt-docker
(2) https://github.com/pi-hole/docker-pi-hole/ (section - Installing Ubuntu)`
Attempted Solutions:
(1) Stop resolution via stub listener:
sudo sed -r -i.orig 's/#?DNSStubListener=yes/DNSStubListener=no/g' /etc/systemd/resolved.conf (from the second guide).
Breaks name resolution on the server.
bullwhip@bravo:~/dockers/pihole-dnscrypt-docker$ curl prdel.cz
curl: (6) Could not resolve host: prdel.cz
bullwhip@bravo:~/dockers/pihole-dnscrypt-docker$nslookup prdel.cz
;; reply from unexpected source: 127.0.0.1#53, expected 127.0.0.53#53
Clients browsers can't connect when I set their DNS servers to the IP of the pihole-dnscrypt server.
ERR_NAME_NOT_RESOLVED
(2) Shut off systemd.resolved:
sudo systemctl disable systemd-resolved
sudo systemctl stop systemd-resolved
Breaks name resolution on the server.
bullwhip@bravo:~/dockers/pihole-dnscrypt-docker$ curl www.prdel.cz
curl: (6) Could not resolve host: www.prdel.cz
bullwhip@bravo:~/dockers/pihole-dnscrypt-docker$ nslookup prdel.cz
;; reply from unexpected source: 127.0.0.1#53, expected 127.0.0.53#53
Clients browsers can't connect when I set their DNS servers to the IP of the pihole-dnscrypt server.
ERR_NAME_NOT_RESOLVED
(3) Repeat step 2 and remove symlink from /etc/resolv.conf to /run/systemd/resolve/stub-resolv.conf by creating a static /etc/resolv.conf.
This seems to work, but it doesn't seem to be a good solution, as I'm loathe to simply do away with systemd-resolved, as Debian/Ubuntu have it there for reasons.
I'm pretty new to linux networking/admin, so I've looked wherever I can think of on the net to find a solution. No luck so far.
I would appreciate any guidance on this.
Thanks!