Set up local DNS caching server on Mac with dnsmasq

brew install dnsmasq
sudo brew services start dnsmasq

Go into your System Preferences -> Network settings and add at the top of your list of DNS servers. Make sure you have some upstream DNS servers listed underneath — when dnsmasq cannot read from the cache, this is where it will fetch the DNS records from.

$ dig | grep -i time
;; Query time: 33 msec

$ dig | grep -i time
;; Query time: 0 msec

Glen Scott

I’m a freelance software developer with 18 years’ professional experience in web development. I specialise in creating tailor-made, web-based systems that can help your business run like clockwork. I am the Managing Director of Yellow Square Development.

More Posts

Follow Me:

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.