Last active
October 5, 2017 18:18
-
-
Save arunkumar-patange/f94fef0a8a08d352c385c9794a9b915d to your computer and use it in GitHub Desktop.
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 | |
cp $(brew list dnsmasq | grep /dnsmasq.conf.example$) /usr/local/etc/dnsmasq.conf | |
sudo cp $(brew list dnsmasq | grep /homebrew.mxcl.dnsmasq.plist$) /Library/LaunchDaemons/ | |
sudo launchctl load /Library/LaunchDaemons/homebrew.mxcl.dnsmasq.plist | |
echo "address=/<domain>/<ip-address>" >> /usr/local/etc/dnsmasq.conf | |
sudo launchctl stop homebrew.mxcl.dnsmasq | |
sudo launchctl start homebrew.mxcl.dnsmasq | |
sudo mkdir -p /etc/resolver | |
sudo tee /etc/resolver/<domain> >/dev/null <<EOF | |
nameserver 127.0.0.1 | |
EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
download and replace
<<domain>>
for ex,abc.dev
andchmod +x dnsmasq-osx.sh