Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

DNS Switcher for Ubuntu Desktop

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.

Install

sudo apt update
sudo apt install python3 python3-tk network-manager
./install.sh

Then open DNS Switcher from the app menu, or run:

dns-switcher

Managing DNS profiles

Open 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.json

DNS 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.

What it changes

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 yes

The 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 no

Troubleshooting

Check active DNS:

resolvectl dns
resolvectl status

Check 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.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages