Skip to content

Instantly share code, notes, and snippets.

@szhajdu
Last active October 9, 2016 16:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save szhajdu/6911696c6f8a2a50814fe6a5724f05bf to your computer and use it in GitHub Desktop.
Save szhajdu/6911696c6f8a2a50814fe6a5724f05bf to your computer and use it in GitHub Desktop.
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