Skip to content

Instantly share code, notes, and snippets.

@lukepolo
Last active January 17, 2020 13:34
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save lukepolo/1c29ee7141ef88b1f091 to your computer and use it in GitHub Desktop.
Save lukepolo/1c29ee7141ef88b1f091 to your computer and use it in GitHub Desktop.
# 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