Securing Your Fedora 39 Network: A Comprehensive Guide to DNS over HTTPS (DoH)

DNS over HTTPS (DoH) is a method that encrypts your DNS queries, enhancing your online privacy and security. Unlike traditional DNS, which sends your queries in plain text, DoH uses HTTPS, the same protocol used for secure web browsing. This prevents your Internet Service Provider (ISP) and other potential eavesdroppers from seeing which websites you're visiting.

Why Use DoH on Fedora 39?

Several compelling reasons exist for enabling DoH on your Fedora 39 system:

Configuring DoH on Fedora 39

Fedora 39 offers several ways to configure DoH. The most common methods include using NetworkManager, systemd-resolved, or directly configuring your browser.

1. Using NetworkManager (Recommended for most users)

NetworkManager is a powerful tool that manages your network connections. Many Fedora users already utilize it. To enable DoH via NetworkManager:

  1. Open the Settings application.
  2. Go to Networking.
  3. Select your active network connection (Wi-Fi or Ethernet).
  4. Click the IPv4 or IPv6 settings (depending on your connection).
  5. Look for an option to set DNS. The exact wording might vary slightly depending on your NetworkManager version.
  6. Instead of entering DNS server addresses directly, select the option for using a DNS over HTTPS provider (if available). If not available, you may need to manually specify a provider's URL in a custom DNS field, or look for an option to edit the DNS settings file.
  7. Choose a reputable DoH provider like Cloudflare (https://cloudflare-dns.com/dns-query), Google Public DNS (https://dns.google/dns-query), or Quad9 (https://dns.quad9.net/dns-query).
  8. Save your changes and restart your network connection.

Important Note: The availability of a direct DoH option within NetworkManager can vary based on your Fedora version and NetworkManager configuration.

2. Using systemd-resolved

systemd-resolved is the system's DNS resolver. You can configure it directly using the following steps:

  1. Edit the /etc/systemd/resolved.conf file (requires root privileges):
    sudo nano /etc/systemd/resolved.conf
  2. Add or modify the following lines, replacing with your chosen DoH provider's URL. For example, for Cloudflare:
    DNSOverHTTPS=yes
    DNSOverHTTPSUseDNSSEC=yes
    DNSOverHTTPSPort=443
    Domains=~.
    DNS=
  3. Add the following line, substituting the URL for your chosen provider:
    DNSOverHTTPS=yes
    DNSOverHTTPSUseDNSSEC=yes
    DNSOverHTTPSPort=443
    Domains=~.
    DNSOverHTTPS=https://cloudflare-dns.com/dns-query
  4. Save the file and restart systemd-resolved:
    sudo systemctl restart systemd-resolved

Warning: Incorrectly configuring systemd-resolved can disrupt your network connectivity. Ensure you understand the changes you're making before proceeding.

3. Configuring your Browser

Many modern browsers (Firefox, Chrome, etc.) offer built-in DoH settings. Check your browser's settings for options to specify a custom DoH provider. This method only encrypts DNS queries made by the browser, not the entire system.

Choosing a DoH Provider

Selecting a reputable DoH provider is crucial. Consider factors such as privacy policy, security practices, and performance. Popular options include:

Troubleshooting

If you encounter issues after configuring DoH, try the following:

By implementing DoH on your Fedora 39 system, you significantly enhance your online security and privacy. Remember to choose a reputable provider and configure DoH carefully to ensure seamless functionality.