To use encrypted DNS (DNS-over-TLS or DNS-over-HTTPS) on Debian 13 with GNOME, you can follow these steps. Debian 13 (likely using systemd-resolved or NetworkManager) supports encrypted DNS configurations. Here’s how to set it up:
Method 1: Using systemd-resolved (Recommended)
systemd-resolved is the default DNS resolver in Debian and supports DNS-over-TLS (DoT) and DNS-over-HTTPS (DoH).
1. Edit the systemd-resolved Configuration
Open the configuration file for systemd-resolved:
bash
sudo nano /etc/systemd/resolved.conf
2. Configure Encrypted DNS
Add or modify the following lines to use a DNS-over-TLS provider (e.g., Cloudflare, Quad9, or Google):
ini
[Resolve]
DNS=1.1.1.1 1.0.0.1 # Cloudflare DNS (IPv4)
# DNS=2606:4700:4700::1111 2606:4700:4700::1001 # Cloudflare DNS (IPv6)
DNSSEC=yes
DNSOverTLS=yes
# Domains=~.
# Cache=yes
For DNS-over-HTTPS (DoH), use a provider like Cloudflare or Google:
ini
[Resolve]
DNS=1.1.1.1
DNSOverTLS=yes
# For DoH, use a proxy like `dnscrypt-proxy` or `systemd-resolved` with a DoH endpoint.
3. Restart systemd-resolved
Apply the changes:
bash
sudo systemctl restart systemd-resolved
4. Verify Encrypted DNS
Check if DNS-over-TLS is active:
bash
systemd-resolve --status
Look for DNS Over TLS: yes in the output.
Method 2: Using NetworkManager (GNOME GUI)
If you prefer a GUI-based approach, use NetworkManager (GNOME’s default network manager).
1. Open Network Settings
Go to Settings > Network.
Select your active connection (Wi-Fi or Ethernet) and click the gear icon (⚙️).
2. Configure DNS
Go to the IPv4 or IPv6 tab.
Disable Automatic DNS and enter the encrypted DNS provider’s IP (e.g., 1.1.1.1 for Cloudflare).
Enable DNS over TLS if the option is available (depends on the NetworkManager version).
3. Apply Changes
Click Apply and restart the connection.
Method 3: Using dnscrypt-proxy (Alternative)
If you prefer DNSCrypt (another encrypted DNS protocol), install dnscrypt-proxy:
1. Install dnscrypt-proxy
bash
sudo apt update
sudo apt install dnscrypt-proxy
2. Configure dnscrypt-proxy
Edit the configuration file:
bash
sudo nano /etc/dnscrypt-proxy/dnscrypt-proxy.toml
Set your preferred DNS provider (e.g., Cloudflare):