# Install `dnsmasq` and configure for *.local and *.localhost domains $ brew install dnsmasq $ vim /opt/homebrew/etc/dnsmasq.conf # Stop and restart service as root. $ brew services stop dnsmasq $ sudo brew services start dnsmasq $ dscacheutil -flushcache # Setup DNS resolving $ sudo mkdir -p /etc/resolver $ sudo tee /etc/resolver/local > /dev/null < /dev/null <