brew install dnsmasq
cp /usr/local/opt/dnsmasq/dnsmasq.conf.example /usr/local/etc/dnsmasq.conf
now this is automatically done by the dnsmasq installation- Replace this in
/usr/local/etc/dnsmasq.conf
file:
address=/test/127.0.0.1
listen-address=127.0.0.1
sudo mkdir -v /etc/resolver
sudo touch /etc/resolver/test
sudo 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 dnsmasq
rm -f /usr/local/etc/dnsmasq.conf
sudo rm -rf /etc/resolver
brew uninstall --force dnsmasq
Thank you for the update.