I run dual PiHoles on Raspi's. They are both in the same vlan (1) at 192.168.1.0/24. DHCP is provided by an Edgerouter running DNSMasq, and the PiHoles have a conditional forwarder set to deliver to the Edgerotuers interface. This works perfect as all of my VLAN 1 DNSMasq names are resolved properly by the PiHoles via the CF setting. The PiHole dashboard shows the names as desired. I also have an IoT VLAN (666) at 172.26.214.32/27. This VLAN offers out the PiHole IP's for DNS just like VLAN 1 does. But I want the VLAN 666 hosts to show the name from the Edgerouter as well. This does not work, instead it just shows the clients VLAN 666 IP.
Actual Behaviour:
Name resolution DOES work for all hosts, however, in the PiHole dashboard the VLAN 666 hosts do not resolve to the name. They only show the clients IP but I want the names to resolve. I suspect the issue stems from only having one CF entry, and I have added into a custom file to try adding the additional subnet but that caused the stats to go berzerk with rapidly increasing hits from that VLAN. Is there a documented setup for PiHole displaying names from multiple alternate subnets?
Regarding the stats going crazy, the specific info I added into 99-pihole-addn-vlans.conf are:
server=/214.26.172.in-addr.arpa/172.26.214.33
Where the subnet is a /27 and the gw is .33. I've read here about how to define vlsm for reverse DNS (DNSMasq uses the same notation as NT DNS) and PiHole seems to silently ignore the commands:
The GW IP stats are showing in arpa format and climbing fast. This is 5 minutes of the settings being in place but hey! Names are resolving at the poor Pi's CPU expense:
If the edgerouter is the DHCP server for all the vLAN's then it's going to know the names. Since the debug token was left of (accidentally or on purpose) we'd have to ask a ton of questions to get the same information provided by the token.
The router runs dnsmasq for hosts it leases but pihole is the pirst query point. I assumed pihole decided to conditionally fwd it to the router is the domain was matched.
That is a dig using 192.168.1.6. What is the IP address of the DNS server that knows how to answer PTR queries for vLAN 666? Is that the DNS server on the edgerouter?
So any PTRs for 192.168.1.0/24 will go to 192.168.1.251. If you want vLAN 666 to be populated with names then you need to know who will answer those queries. Is it 192.168.1.251? Does dig -x 172.26.214.10 @192.168.1.251 work? Or does the Edgerouter have a different DNS server for vLAN 666? Is the Edgerouter set up to isolate the vLANs so that it will only answer 192 on 192 and not 172 on 192?
Yeah I eff'd up. Here's what you wanted. It appears from the pihole, using your dig syntax it can reverse lookup at either 172.26.214.33 OR 192.168.1.251.
ok, just before you sent that I edited the line to steer vlan 666 subnet to the routers interface in vlan 1 and I found the insane PTR queries ceased. So it seems this format server=/2-27.214.26.172.in-addr.arpa/192.168.1.251
may solve it too, though it hadn't occurred to me to try swapping the ip's in this way.
i have a few other vlans to work out too, so I will try your suggested rev-server method on those.
ok. i found that even though I entered the subnetId and mask bits to trim the hosts to only the vlan it still seems to be resolving the other vlans adjacent to 172.26.214.32/27 in the /24 space. In my case that's still acceptable though for some it may be problematic.