Beta 42

Research and Development


Pi-Hole as a LAN DNS Server

PiHole as LAN DNS server

Use your PiHole as the DNS server for your LAN.

Create a second dnsmasq configuration file:

echo "addn-hosts=/etc/pihole/lan.list" | sudo tee /etc/dnsmasq.d/02-lan.conf

Create a hosts file for your network: /etc/pihole/lan.list with the following format: ipaddress fqdn hostname, e.g.:     iroman.your.lan  ironman     hulk.your.lan    hulk     loki.your.lan    loki

... substituting your.lan with whatever you wish your domain name to be.

On your DHCP server (your router, or even more likely the PiHole), you’ll also need to set your search domain to whatever your.lan corresponds to.

Finally, restart your name server:

sudo pihole restartdns