This post describes hot to use dnsmasq as a local DNS server for faster caching and to resolve domain names in your private address space.
Installing dnsmasq
Installing dnsmasq is easy when you have Homebrew installed on your Mac:
brew update && brew install dnsmasq
And follow Homebrew’s hints on how to activate dnsmasq:
# copy example configuration file:
cp /usr/local/Cellar/dnsmasq/2.57/dnsmasq.conf.example /usr/local/etc/dnsmasq.conf
# To load dnsmasq automatically on startup:
sudo cp /usr/local/Cellar/dnsmasq/2.57/uk.org.thekelleys.dnsmasq.plist /Library/LaunchDaemons
sudo launchctl load -w /Library/LaunchDaemons/uk.org.thekelleys.dnsmasq.plist
Configuring dnsmasq
OK, let’s edit the dnsmasq configuration file /usr/local/etc/dnsmasq.conf now.