↑ Return to Pihole

Use Pihole to resolve DNS

dnsmasq will read any file in dnsmasq.d as a configuration file; this is how Pi-hole works too. The file (02-mydns.conf) you’ve added tells dnsmasq where to find another hosts file (hosts.mydomain).

This will survive installs and updates by the Pi-Hole curl script. Anytime you update your hosts.mydomain file you will need to restart dnsmasq for changes to take effect. You can name the hosts file and the conf file to whatever you’d like.


Use PiHole to resolve local DNS

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. sprinklers server

Create a new dnsmasq conf file
sudo nano /etc/dnsmasq.d/02-mydns.conf

Add one line of code to the file
addn-hosts=/etc/hosts.mydomain Write out and exit.

Restart dnsmasq
sudo service dnsmasq restart


Borrowed from here. Thank you.