-
-
Save hqman/d6c685c2ac7aec64d3ab to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# If you don't have Homebrew installed, you should. Do this. | |
/usr/bin/ruby -e "$(/usr/bin/curl -fksSL https://raw.github.com/mxcl/homebrew/master/Library/Contributions/install_homebrew.rb)" | |
# Install DNSMasq from Homebrew | |
brew install dnsmasq | |
# Create a directory for virtual hosts files | |
mkdir -p /usr/local/etc/dnsmasq.d | |
# Create a config for DNSMasq | |
vim /usr/local/etc/dnsmasq.conf | |
# Insert the following settings | |
server=8.8.8.8 # Public upstream DNS server 1 for non-local domains - Google | |
server=208.67.222.222 # Public upstream DNS server 2 for non-local domains - OpenDNS | |
server=208.67.220.220 # Public upstream DNS server 3 for non-local domains - OpenDNS | |
conf-dir=/usr/local/etc/dnsmasq.d # Put virtual hosts in a separate file/directory structure | |
# Start DNSMasq at bootup | |
sudo cp /usr/local/Cellar/dnsmasq/2.60/homebrew.mxcl.dnsmasq.plist /Library/LaunchDaemons | |
sudo launchctl load -w /Library/LaunchDaemons/homebrew.mxcl.dnsmasq.plist |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment