Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Configure a local dnsmasq server on OS X.
#!/bin/bash
sudo port -v install dnsmasq
sudo port -v load dnsmasq
sudo mkdir /etc/resolver
echo -n "nameserver 127.0.0.1" | sudo tee /etc/resolver/dev
echo "address=/dev/127.0.0.1" | sudo tee -a /opt/local/etc/dnsmasq.conf
echo "address=/test/127.0.0.1" | sudo tee -a /opt/local/etc/dnsmasq.conf
sudo kill -9 $(pgrep dnsmasq)
sleep 1
dig +short @localhost domain.dev
@oko

This comment has been minimized.

Copy link
Owner Author

oko commented Feb 12, 2015

curl -L https://gist.githubusercontent.com/oko/c05420c39efa3204d2b7/raw | bash

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.