Simple GUI toggle for /etc/resolv.conf for us old dogs still handling DNS that way.
- Toggling between 2 main DNS servers
- Toggle for a 3rd DNS server that overrides the 2 main (useful for VPN etc)
- Handles empty /etc/resolv.conf and creates it when we toggle
- Should leave alone things like domain, search and comments
- libgtk-3-dev
- librsvg2-dev
Make file nameservers.conf before building, example:
nameserver 1.1.1.1
nameserver 8.8.8.8
nameserver 9.9.9.9
Then:
sudo apt install libgtk-3-dev librsvg2-dev build-essential
git clone git@github.com:ittykeys/dns-toggle.git
cd dns-toggle
makePlease backup your precious /etc/resolv.conf before running:
sudo cp /etc/resolv.conf /etc/resolv.conf.bkThen:
./dns-toggleIt will ask for authentication via pkexec when toggling.
- Detect and re-toggle previous state (and toggle state) properly after 3rd dns toggled (especially at startup).
- Detect and error out if /etc/resolv.conf is handled by another system.
- Future-proof for gtk4
- Add flag to auth immediately at launch, negating the need for auth every toggle
- Windows version (are network connection options exposed via win api?)
- Pack assets in executable
- Don't block main gui thread for auth (#3500)
- KDE widget (#3480)
- Option to modify DNS at startup (#3523)
- Mobile app (#3538)
- Temp file while active (#3544)
This project is licensed under the GNU General Public License - see the License file file for details.

