You gotta love Pi-Hole. Not more ads on all your devices. I’m really happy with my configuration except for the fact that IP’s instead of device names are shown. This is because my PI-hole instance DHCP is not enabled.
I run Pi-hole on my Synology nas (DSM 5.2) without the DHCP option. The EdgeMAX router X is responsible for DHCP. Conditional forwarding didn’t work until last week!
First of all make sure the router has correct name servers!
System -> Name Servers
I have decided to use 184.108.40.206 and 220.127.116.11 (cloud flare) but feel free to choose the once you like. Just don’t select the IP of Pi-hole instance! We don’t want to create a loop of requests.
I use the EdgeMAX router as DHCP server for my network.
Configure the DHCP server the way you want. (Read the manual here for instructions). Make sure to remember the domain name. We need this when configuring the Pi-Hole conditional forwarding.
In my case all devices like my macBook named macmasselink will become available as macmasselink.masselink.home.
I’m not going to write an instruction to install PI-hole. There are plenty of guides in the internet. This topic is only going to cover conditional forwarding.
Settings -> DNS -> scroll down
Read the instruction on your screen carefully and add the ip of your router with the local domain name you want to forward. (In my case masselink.home)
Succes or ????
This didn’t result in a working configuration for me because the EdgeMAX routers wasn’t accepting any requests. Besides adding the listeners this system is also forced to update the hostfile to be able to easy resolve local hosts.
Login in the router using ssh and type the following commands.
configure set service dns forwarding listen-on <interface> set service dhcp-server hostfile-update enable commit save
Change <interface> with the interface you want to use. (You can add multiple). f.e eth1, eth2 etc.
I’ve restarted the EdgeMAX flushed the Pi-Hole logs……bingo! The names started to show correctly.