Skip to content

Instantly share code, notes, and snippets.

@sergeycherepanov
Last active February 2, 2016 13:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sergeycherepanov/5fc4556ca1f4dc1c849e to your computer and use it in GitHub Desktop.
Save sergeycherepanov/5fc4556ca1f4dc1c849e to your computer and use it in GitHub Desktop.
brew install dnsmasq
cd $(brew --prefix)
mkdir etc
echo 'address=/.dev/127.0.0.1' >> etc/dnsmasq.conf
echo 'address=/.loc/127.0.0.1' >> etc/dnsmasq.conf
sudo chown root $(brew --prefix dnsmasq)/homebrew.mxcl.dnsmasq.plist
sudo ln -s $(brew --prefix dnsmasq)/homebrew.mxcl.dnsmasq.plist /Library/LaunchDaemons/
sudo launchctl load -w /Library/LaunchDaemons/homebrew.mxcl.dnsmasq.plist
sudo mkdir /etc/resolver
sudo bash -c 'echo "nameserver 127.0.0.1" > /etc/resolver/dev'
sudo bash -c 'echo "nameserver 127.0.0.1" > /etc/resolver/loc'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment