Quick Reference
Configuration Endpoints
Use these addresses across all methods below.
🔒 DNS over HTTPS
🛡 DNS over TLS
§ I
systemd-resolved
The recommended approach for any modern Linux distribution running systemd 239 or later.
Method 1 — systemd-resolved Configuration
Verify the service is running and enabled before proceeding.
This mode tries TLS first and falls back to unencrypted only if the server doesn't support it.
Use this for a zero-tolerance encrypted-only configuration. Queries fail rather than fall back to plaintext.
§ II
Command Line
Use resolvectl for per-interface configuration without editing files directly.
Method 2 — resolvectl
Replace eth0 and wlan0 with your actual interface names (check with ip link).
§ III
NetworkManager
For desktop distributions where NetworkManager manages connections.
Method 3 — nmcli
Ubuntu / Debian
Replace "Wired connection 1" with your connection name from nmcli con show.
Fedora / RHEL
This targets your currently active connection automatically.
§ IV
Auto-Setup Scripts
Copy, save, and run the script for your distribution — it handles everything end to end.
Ubuntu / Debian
Fedora / RHEL
Arch Linux
§ V
Alternative Daemons
For older distributions or if you prefer not to use systemd-resolved.
Stubby — DNS Privacy Daemon
dnscrypt-proxy
Confirm It's Working
Verification
Run these commands to confirm DoT is active and no plaintext queries are leaking.
Check DNS Configuration
Test DoT Directly with kdig
Common Issues
Troubleshooting
If something isn't working, check these first.
DoT Not Working?
- Check service is running:
sudo systemctl status systemd-resolved - Open port 853 outbound:
sudo ufw allow out 853 - Verify DNS IP address is correct in resolved.conf
- Check for conflicting services: dnsmasq, bind, unbound
- Confirm resolv.conf symlink:
ls -la /etc/resolv.conf - Restart service:
sudo systemctl restart systemd-resolved
Common Linux Issues
- Old systemd: update to systemd 239+ for full DoT support
- Firewall blocking: port 853 must be allowed outbound
- NM conflicts: disable dnsmasq plugin in NetworkManager.conf
- Corporate networks: port 853 may be blocked — use DoH instead
- Flush cache:
sudo systemd-resolve --flush-caches
Distribution Support
Compatibility
Choose the right method for your distribution.
Ubuntu 18.04+
Full systemd-resolved support. Recommended for all Ubuntu versions.
Debian 10+
Native systemd-resolved. Buster and later fully supported.
Fedora 29+
Excellent systemd integration across all modern releases.
Arch Linux
Latest systemd features via rolling release — always current.
RHEL / CentOS 8+
Available via EPEL. Requires additional setup steps.
Older Distros
Use Stubby or dnscrypt-proxy as a drop-in alternative.
Need More Help?
Reach out or explore other platform guides in the Knowledge Base.