Local DNS

Use PiHole as Local DNS Resolver

1. Create a new hosts file

sudo nano /etc/hosts.mydomain

Add IP addresses followed by the local hostname you'd like to resolve, one per line. Write out and exit.

2. Create a new dnsmasq conf file

sudo nano /etc/dnsmasq.d/02-mydns.conf

3. Add addn-hosts Line

Reference hosts file created in step one

addn-hosts=/etc/hosts.mydomain

Write out and exit

4. Restart dnsmasq

sudo service dnsmasq restart

Last updated