Disable systemd stub resolver on Ubuntu
By hernil
Ever had trouble listening to port 53 on an Ubuntu installation? It is due to systemd having it’s own internal resolver doing some caching Fine, but here is how I disable it.1
sudo sed -r -i.orig 's/#?DNSStubListener=yes/DNSStubListener=no/g' /etc/systemd/resolved.conf && \
sudo sh -c 'rm /etc/resolv.conf && ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf' && \
sudo systemctl restart systemd-resolved
Now feel free to claim port 53 for Pihole, Technitium or whatever other DNS server you want listening to port 53.
-
Initially inspired by some Pihole docs. ↩︎
Input or feedback to this content?
Reply via email!
Related Articles
- Self Hosted DNS with a twist
- Sending Mail From Servers
- Ubuntu 24.04 Docker Watchtower Problems
- ZFS Encrypted Backups
- Publishing PGP Keys With WKD
- Syncing Kobo and Calibre Web
- Replacing Maps Timeline With Owntracks
- State of De-Googling Part 2
- State of De-Googling
- Baikal CalDAV Hosting
- Moving From Philips Hue Hub to Home Assistant Zigbee
- Using Stow and Git for Config Files
- Deploy Your Applications With Watchtower
- Block Paths With Traefik
- Digging Through Internet History