Skip to main content

Resetting DNS

DNS-MNS can restore your DNS settings to automatic (DHCP) mode, where your router or ISP provides DNS servers.

Using DNS-MNS to Reset

The easiest way to reset DNS is through the tool itself:
  1. Run dns-mns
  2. Select option 3 (Clear/Reset DNS)
  3. Confirm the reset
[ CLEAR/RESET DNS ]

This will reset your DNS settings to automatic (DHCP).
Your router/ISP will provide DNS servers.

Are you sure? (y/n): y

Resetting DNS settings...
DNS has been reset to automatic.

What Reset Does

systemd-resolved:
  • Removes /etc/systemd/resolved.conf.d/dns-mns.conf
  • Restarts systemd-resolved service
NetworkManager:
  • Resets ipv4.ignore-auto-dns to no
  • Clears custom DNS settings
  • Reloads the connection
resolv.conf:
  • Restores from backup if available
  • Or configures for DHCP

Manual Reset

If DNS-MNS isn’t available, you can reset manually:
systemd-resolved:
sudo rm /etc/systemd/resolved.conf.d/dns-mns.conf
sudo systemctl restart systemd-resolved
NetworkManager:
# Get your connection name
nmcli connection show

# Reset DNS
sudo nmcli connection modify "Your Connection" ipv4.dns ""
sudo nmcli connection modify "Your Connection" ipv4.ignore-auto-dns no
sudo nmcli connection up "Your Connection"
resolv.conf:
# If you have a backup
sudo cp /etc/resolv.conf.backup /etc/resolv.conf

# Or let DHCP handle it
sudo dhclient -r && sudo dhclient

Flushing DNS Cache

After resetting DNS, it’s a good idea to flush your DNS cache:
sudo resolvectl flush-caches

Verifying Reset

Confirm that DNS has been reset to automatic:
resolvectl status
Look for “DNS Servers” from your router’s IP range (e.g., 192.168.x.x).

When to Reset DNS

Consider resetting DNS if:
  • You’re experiencing connectivity issues
  • Websites aren’t loading correctly
  • You want to return to your ISP’s default DNS
  • You’re troubleshooting network problems
After resetting, your ISP-provided DNS will be used. This may be slower or have restrictions depending on your provider.