← All DNS guides

How to set up OpenDNS or Google DNS on Fedora / RHEL

Fedora and RHEL-family systems typically use NetworkManager plus systemd-resolved.

Why change DNS on Fedora?

Custom DNS avoids captive or filtered ISP resolvers that break only some domains.

Recommended public DNS servers

  • OpenDNS (Cisco): 208.67.222.222 / 208.67.220.220
  • Google Public DNS: 8.8.8.8 / 8.8.4.4
  • Cloudflare DNS: 1.1.1.1 / 1.0.0.1

Configure DNS

  1. Open Settings → Network and edit the active wired or Wi‑Fi profile.
  2. On IPv4, disable automatic DNS if present and add 8.8.8.8 and 8.8.4.4 (or OpenDNS addresses).
  3. Apply and reconnect.
  4. CLI alternative: sudo nmcli connection modify "CONNECTION_NAME" ipv4.dns "208.67.222.222 208.67.220.220" ipv4.ignore-auto-dns yes
  5. Bring the connection up again with nmcli connection up "CONNECTION_NAME".

Flush caches

Clear systemd-resolved after the change.

sudo resolvectl flush-caches
  1. Run sudo resolvectl flush-caches
  2. Optionally restart NetworkManager: sudo systemctl restart NetworkManager
  3. Test with curl -I https://example.com

Verify it worked

Confirm DNS servers in nmcli connection show "CONNECTION_NAME" | grep ipv4.dns.

Related DNS guides