Skip to content

Instantly share code, notes, and snippets.

@ColinTheRobot
Created January 5, 2015 16:19
Show Gist options
  • Save ColinTheRobot/1930090fb2174e4fe49c to your computer and use it in GitHub Desktop.
Save ColinTheRobot/1930090fb2174e4fe49c to your computer and use it in GitHub Desktop.
DNSMasq
# DNSMasq
brew install dnsmasq
# follow onscreen instructions for dnsmasq config. path below may have changed
# cp /usr/local/Cellar/dnsmasq/2.63/dnsmasq.conf.example /usr/local/etc/dnsmasq.conf
# (MAY NOT BE NECESSARY)
# dnsmasq needs to run as root, so it needs to be installed into LaunchDaemons
# sudo cp /usr/local/Cellar/dnsmasq/2.63/homebrew.mxcl.dnsmasq.plist /Library/LaunchDaemons/
# edit the conf. Replace "subl" with your editor call
subl /usr/local/etc/dnsmasq.conf
# add
address=/dev/127.0.0.1
listen-address=127.0.0.1
sudo -i
mkdir -p /etc/resolver
echo 'nameserver 127.0.0.1' > /etc/resolver/dev
dscacheutil -flushcache
scutil --dns
^D to logout
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment