DNS Switcher

Quickly change your DNS settings in OS X.

View the Project on GitHub mattmcneeney/DNSSwitcher

DNS Switcher

DNS Switcher is a simple menu-bar utility that allows you to quickly switch between pre-configured DNS settings. Download latest ZIP.

Screenshot 1 Screenshot 2

Configuration

A configuration file is automatically created on the first run at ~/.dnsswitcher.json. This file can be modified manually or via the settings menu.

The structure of the configuration file must be as follows:

{
   "interface": "...", // e.g. "Wi-Fi", can be chosen via the menu
   "settings": [
      {
         "name": "...",      // (Required) e.g. "Google"
         "servers": [ ... ]  // (Required) e.g. [ "8.8.8.8", "8.8.4.4" ],
         "load_cmd": "..."   // (Optional) e.g. "echo 'Hello, world!'"
      }
   ]
}

name: The name of the setting that will be shown in the menu.

servers: A list of IP addresses of the DNS servers that should be used.

load_cmd: (optional) A shell command that should be run when these DNS servers are loaded.

Changing DNS settings

Simply choose the DNS setting you want to change to and hit Load. You will be prompted for your login password to change your network preferences. The default interface that the DNS settings will be changed for is "Wi-Fi". This can be changed from the menu or via the configuration file as documented above.

Support / Contributions

If you find any bugs or want to suggest an improvement, please submit an issue. All contributions welcome!

Tested on OS X El Capitan (10.11.5)