Skip to content

Using dnsmasq

Install dnsmasq#

Example
sudo apt-get update && apt-get install dnsmasq
sudo yum install dnsmasq
brew install dnsmasq

Create resolver directory#

sudo mkdir /etc/resolver
sudo chown $USER:$USER /etc/resolver

Enable resolver configuration for *.dev TLD#

echo "nameserver 127.0.0.1" > /etc/resolver/dev

Map all *.dev sub-domains to resolve 127.0.0.1#

echo "address=/.dev/127.0.0.1" >> /usr/local/etc/dnsmasq.conf

References and further reading#


Last update: July 13, 2022
Created: July 13, 2022