0

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!

2
  • If the pihole-dnscrypt docker has a GitHub site, I think I would probably try that first - submit an "issue", read their wiki, etc.
    – Seamus
    Jul 25 at 17:24
  • Thanks @seamus. I definitely will do so. I checked there before posting here, and I only saw one issue that never really was resolved. I didn't want to cross-post unnecessarily.
    – stinkfoot
    Jul 26 at 12:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.