← back to home FR

Configure le_dns on Linux

Privacy-first DNS on Linux — multiple methods

Linux gives you full control over DNS configuration. Pick the method that matches your setup. Why change your DNS?


Method 1: systemd-resolved (Ubuntu 18+, Fedora, Arch)

Edit /etc/systemd/resolved.conf:

[Resolve]
DNS=51.75.96.82 51.89.95.33 151.115.80.165
FallbackDNS=51.75.96.82

Then restart the service:

sudo systemctl restart systemd-resolved

Enable DoT with systemd-resolved

Add DNSOverTLS=yes to the same file:

[Resolve]
DNS=51.75.96.82 51.89.95.33 151.115.80.165
FallbackDNS=51.75.96.82
DNSOverTLS=yes

systemd-resolved will validate the TLS certificate against the hostname ledns.eu. Restart the service after saving.


Method 2: NetworkManager (desktop distros)

# Replace "connection" with your connection name (check with: nmcli con show)
nmcli con mod "connection" ipv4.dns "51.75.96.82 51.89.95.33 151.115.80.165"
nmcli con mod "connection" ipv4.ignore-auto-dns yes
nmcli con up "connection"

To find your connection name:

nmcli con show

Method 3: Direct resolv.conf

For systems without systemd-resolved or NetworkManager (e.g. minimal servers):

sudo nano /etc/resolv.conf

Add or replace with:

nameserver 51.75.96.82
nameserver 51.89.95.33
nameserver 151.115.80.165

Warning: On most desktop distros, /etc/resolv.conf is managed automatically and will be overwritten. Use methods 1 or 2 for persistent changes. On servers, you may need to make it immutable:

sudo chattr +i /etc/resolv.conf

Verify it works

dig example.com

Check the resolver used:

resolvectl status

Look for the le_dns IPs in the DNS server list. For a full leak test, visit dnsleaktest.com.

What's next?