I have DHCP enabled along with a bunch of static leases. I thought I could use the name of the static lease and have pihole resolve it to the correct IP (like the Local DNS feature). However, it only seems to work for some and not others (5 work out of 12 total). In the cases where it's working, the logs show it still forwards to Google, so I guess it's not really working as I hoped anyway, and it worked by magic. Do I really have to set it up twice (once for static IP, once for local name), or am I missing something?
Ah, the ones that were not working were configured to have a static IP on the machine, so that makes sense. A trap for young players. I will change them to use DHCP (or use Local DNS).
Does this imply that if a machine has Wake On LAN and the lease has expired because it's off, then you won't be able to access it via the DHCP name? Accessing via IP would then wake it, causing it to get a new lease, after which time you can use the DHCP name - correct?
As far as I know you don't need hostnames or IPs for WOL. It does work by magic packets containing the MAC address of the device.
But in principle you are right. If the device has no active lease, hostname resolution won't work. You can circumvent this but setting "Local DNS Records"