Created
January 21, 2014 02:37
-
-
Save ianwremmel/8533517 to your computer and use it in GitHub Desktop.
Setup all hosts on the `dev` TLD to point at `127.0.0.1`.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
brew install dnsmasq | |
# Configure automatic startup | |
sudo cp -fv /usr/local/opt/dnsmasq/*.plist /Library/LaunchDaemons | |
sudo mkdir /etc/resolver | |
echo "nameserver 127.0.0.1" | sudo tee -a /etc/resolver/dev | |
echo "address=/.dev/127.0.0.1" > /usr/local/etc/dnsmasq.conf | |
pbcopy < /usr/local/opt/dnsmasq/dnsmasq.conf.example | |
pbpaste >> /usr/local/etc/dnsmasq.conf | |
# Start now | |
sudo launchctl load /Library/LaunchDaemons/homebrew.mxcl.dnsmasq.plist |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment