To setup your computer to work with *.local domains, e.g. project.local, awesome.local and so on, without having to add to your hosts file each time.
- Homebrew
- Mountain Lion -> High Sierra
brew install dnsmasq
mkdir -pv $(brew --prefix)/etc/
echo 'address=/.local/127.0.0.1' >> $(brew --prefix)/etc/dnsmasq.conf
echo 'address=/.cluster.local/192.168.205.1' >> $(brew --prefix)/etc/dnsmasq.conf
Change port for High Sierra (was in original gist, but in os x 12+ this works without port change so can be skipped)
echo 'port=53' >> $(brew --prefix)/etc/dnsmasq.conf
sudo brew services start dnsmasq
sudo mkdir -v /etc/resolver
sudo bash -c 'echo "nameserver 127.0.0.1" > /etc/resolver/local'
That's it! You can run scutil --dns to show all of your current resolvers, and you should see that all requests for a domain ending in .local will go to the DNS server at 127.0.0.1