$ brew install dnsmasq
$ vim /usr/local/etc/dnsmasq.conf
# Copy the daemon configuration file into place.
$ sudo cp $(brew list dnsmasq | grep /homebrew.mxcl.dnsmasq.plist$) /Library/LaunchDaemons/
$ sudo launchctl unload /Library/LaunchDaemons/homebrew.mxcl.dnsmasq.plist