Last active
January 17, 2020 13:34
-
-
Save lukepolo/1c29ee7141ef88b1f091 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
# Install dnsmasq | |
brew install dnsmasq | |
# Copy the default configuration file. | |
cp $(brew list dnsmasq | grep /dnsmasq.conf.example$) /usr/local/etc/dnsmasq.conf | |
# Copy the daemon configuration file into place. | |
sudo cp $(brew list dnsmasq | grep /homebrew.mxcl.dnsmasq.plist$) /Library/LaunchDaemons/ | |
# Start Dnsmasq automatically. | |
sudo launchctl load /Library/LaunchDaemons/homebrew.mxcl.dnsmasq.plist | |
echo "address=/app/192.168.10.10" >> /usr/local/etc/dnsmasq.conf | |
#restart dnsmaq | |
sudo launchctl stop homebrew.mxcl.dnsmasq | |
sudo launchctl start homebrew.mxcl.dnsmasq | |
#make osx use dnsmasq | |
sudo mkdir -p /etc/resolver | |
sudo tee /etc/resolver/app >/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