Skip to content

Instantly share code, notes, and snippets.

@davidguttman
Forked from juliangruber/gist:7356251
Created November 7, 2013 17:50
Show Gist options
  • Save davidguttman/7358838 to your computer and use it in GitHub Desktop.
Save davidguttman/7358838 to your computer and use it in GitHub Desktop.

First, install dnsmasq using brew:

$ brew update
$ brew install dnsmasq

Then create your configuration

$ echo "address=/localhost/127.0.0.1" > /usr/local/etc/dnsmasq.conf

Now add it to your start up items:

$ sudo cp -fv /usr/local/opt/dnsmasq/*.plist /Library/LaunchDaemons

And launch it:

$ sudo launchctl load /Library/LaunchDaemons/homebrew.mxcl.dnsmasq.plist

Next tell OSX to use it:

Go to System Preferences -> Network -> Advanced -> DNS. Now remember the dns server you already have and add two entries: 127.0.0.1 and your former dns server. -> OK -> Apply.

And you're good to go!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment