Small GUI app for switching the active NetworkManager connection between editable DNS profiles.
Default profiles:
- Restricted / local AdGuard DNS:
192.168.1.2 - More open / Quad9 DNS:
9.9.9.9 - Automatic DNS from DHCP/router
The app uses nmcli through pkexec. It does not edit /etc/resolv.conf directly.
sudo apt update
sudo apt install python3 python3-tk network-manager
./install.shThen open DNS Switcher from the app menu, or run:
dns-switcherOpen Profiles → Manage DNS profiles… or press Manage… next to the DNS profile selector.
You can:
- add a new DNS profile
- edit an existing DNS profile
- delete profiles
- reset back to the defaults
Profiles are saved here:
~/.config/dns-switcher/profiles.jsonDNS IPs can be entered as a space-separated or comma-separated list, for example:
192.168.1.2
9.9.9.9, 149.112.112.112
IPv4 and IPv6 addresses are validated before saving.
For the selected active connection, a manual DNS profile sets:
ipv4.dns "<selected IPv4 DNS list>"
ipv4.ignore-auto-dns yes
ipv6.dns "<selected IPv6 DNS list>"
ipv6.ignore-auto-dns yesThe automatic DNS ignore flags are intentional: otherwise a router-provided DNS server can bypass the selected manual DNS profile.
Automatic mode clears manual DNS and re-enables automatic DNS:
ipv4.dns ""
ipv4.ignore-auto-dns no
ipv6.dns ""
ipv6.ignore-auto-dns noCheck active DNS:
resolvectl dns
resolvectl statusCheck the NetworkManager connection profile:
nmcli connection show
nmcli connection show "YOUR_CONNECTION_NAME"If your system does not use NetworkManager for the active connection, this app is the wrong abstraction. Use Netplan/systemd-networkd instead.