Skip to content

Instantly share code, notes, and snippets.

@metafour
Forked from moofish32/dnsmasq_setup.sh
Last active October 1, 2015 21:57
Show Gist options
  • Save metafour/52f9650497b948075752 to your computer and use it in GitHub Desktop.
Save metafour/52f9650497b948075752 to your computer and use it in GitHub Desktop.
#!/usr/bin/env sh
brew install dnsmasq;
cp /usr/local/opt/dnsmasq/dnsmasq.conf.example /usr/local/etc/dnsmasq.conf;
sudo cp -fv /usr/local/opt/dnsmasq/*.plist /Library/LaunchDaemons;
sudo chown root /Library/LaunchDaemons/homebrew.mxcl.dnsmasq.plist;
sudo launchctl load /Library/LaunchDaemons/homebrew.mxcl.dnsmasq.plist;
sed -i.bak '/#address=\/double-click\.net\/127\.0\.0\.1/a\
address=/bspot.dev/'$(docker-machine ip vpn-dev) /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/bspot.dev >/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