Coming from a 'flat' network (one subnet) with Pihole serving as DNS and DHCP server I had to move to a more 'sophisticated' network with 4 separated vlans to keep all my 'smart' stuff contained.
I am now using the router (UniFi Edgerouter) for DHCP (4 DHCP server, one for every vlan/subnet)
I am using the Pihole as a single DNS for all vlans/subnets.
I have the necessary firewall rules in place to allow access to the Pihole.
DNS info is handed out by the DHCP server(s) on the router
Everything works as expected. All vlans resolve through the Pihole and it is doing its job to block all the trackers/ads (Yeah!)
My issues:
TOP CLIENTS in Pihole are only showing IP addresses
Resolving local servers by name (e.g. nas.lan etc.) is no longer possible since DHCP and DNS services are running on different servers.
Reading through the documentation of Pihole (which is very thorough, thanks for compiling this) and read through the HELP section and FAQ on this discourse server. Came to the conclusion that I have to enable CONDITIONAL FORWARDING (under settings->DNS), added one of my networks (192.168.1.0/24) and pointed this entry to the appropriate DHCP server on the router (192.168.1.1), including the local domain name (lan).
Result:
Pihole is still showing IP addresses only (under TOP CLIENTS)
ping pihole2 (active DNS server with the CONDITIONAL FORWARDING enabled) results in:
Pinging Pihole2.local [fe80::32de:e443:1448:b5a8%7] with 32 bytes of data:
Reply from fe80::32de:e443:1448:b5a8%7: time=28ms
Reply from fe80::32de:e443:1448:b5a8%7: time=27ms
It seems I have several issues:
#1: Pihole only showing IP addresses instead of hostnames #2: nslookups not resolving at all #3: Where are the IP6 coming from and where is the .local coming from when pinging pihole2?
Thanks for the help, I was hoping I do not have to manually maintain the list on 2 Piholes.
Under CONDITIONAL FORWARDING is says:
One solution for this is to configure Pi-hole to forward these requests to your DHCP server (most likely your router), but only for devices on your home network. To configure this we will need to know the IP address of your DHCP server and which addresses belong to your local network
That sound like it would solve my issue without manually configure local IPs with server names. Is my interpretation wrong?
For Conditional Forwarding to work,
a. your router's firewall has to allow DNS requests from Pi-hole
b. your router has to run a DNS resolver, and
c. your router's DHCP server must insert DNS records for DHCP client hostnames into that DNS resolver
( and d. CF has to be configured correctly, of course.)
You could check if and how your router's DNS resolver (presumably at 192.168.1.1) is responding by running the following command from the machine hosting your Pi-hole:
Correct me if I am wrong but that suggest that:
a) the request goes through the firewall
b) a DNS server is indeed running/listening but has no clue what I am looking for
So I started digging in the router (Ubiquity Edgerouter) which is new to me (so I have to read up on it as we go).
router:> show dns forwarding nameservers
75.75.75.75 available via 'dhcp eth0'
75.75.75.76 available via dhcp eth0
Those are the DNS servers of my provider COMCAST on the WAN interface (eth0) of the router.
Reading in the online manual of the Edgerouter (https://help.ui.com/hc/en-us/articles/115002673188) it seems that the default DHCP service uses the ICP DHCP daemon but can be configured to use the dnsmasq instead. Is that the route I wanna go? I know this is beyond the Pihole help forum but I would appreciate your insight.
Thanks for all the suggestions. After enabling dnsmasq on the Edgerouter conditional forwarding works (for most clients (as sawsanders pointed out)). Here a link (for additional detail) for others dealing with this issue: EdgeRouter Lite Dnsmasq setup | Logan Marchione
Yes, and this is a common case for certain Ubiquiti equipment, showing up in the forums every now and then, see e.g. Conditional forwarding.. What is wrong?.