Skip to content

Instantly share code, notes, and snippets.

@szhajdu

szhajdu/dnsmasq-init.sh

Last active Oct 9, 2016
Embed
What would you like to do?
Wildcard forwarding of all *.dev DNS names to localhost. Setup dnsmasq on Mac OS.
# Install dnsmasq.
brew install dnsmasq
# Setup *.dev.
echo 'address=/.dev/127.0.0.1' > /usr/local/etc/dnsmasq.conf
# Start it and ensure it auto-starts on reboot in the future
sudo brew services start dnsmasq
# Setup dns resovler.
sudo mkdir -p /etc/resolver
sudo bash -c 'echo "nameserver 127.0.0.1" > /etc/resolver/dev'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment