brew install dnsmasqcp /usr/local/opt/dnsmasq/dnsmasq.conf.example /usr/local/etc/dnsmasq.confnow this is automatically done by the dnsmasq installation- Replace this in
/usr/local/etc/dnsmasq.conffile:
address=/test/127.0.0.1
listen-address=127.0.0.1
sudo mkdir -v /etc/resolversudo touch /etc/resolver/testsudo bash -c 'echo "nameserver 127.0.0.1" > /etc/resolver/test'sudo brew services start dnsmasq- Restart your Mac to make it work
sudo brew services stop dnsmasqrm -f /usr/local/etc/dnsmasq.confsudo rm -rf /etc/resolverbrew uninstall --force dnsmasq
Thank you for the gist.
Note: permissions issue fixed like so: