@johnpoz / @pfpv - Thanks for your comments. I think I got a step further and I tried to summarize what I did and what I am trying to do below:
Intended behavior:
All DNS requests should be redirected to the pfSense resolver or forwarder (depending on the VLAN)
DNS traffic should be routed through pi-hole where it is added in the DHCP settings of the respective VLAN
DNSLeaktest should only show one server for the resolver gateway and however many (normally 4-6) for the forwarder gateway (goes through quad9) @johnpoz This relates to your question.
In the best case, I only need to add the pi-hole IPs in the DHCP settings
Actual behavior:
Option 1: Resolver and forwarder works, DNSleaks shows the correct servers, but traffic does not go through the pi-hole servers
Option 2: Traffic goes through pi-hole, resolver and forwarder works, but DNSleaks shows the "wrong" servers, as the resolver server leaks into the forwarder gateway, which means I see the resolver DNS servers AND the forwarder DNS servers.
Temporary fix (for resolver VLANs): Disable the general DNS redirect NAT rule for resolver VLANs, as I have control over the devices and none of them are going rogue with hardcoded DNS servers, e.g. laptops. iPads, phones etc.
I am still missing a permanent solution for the resolver VLANs and a solution at all for the forwarder VLANs, as forwarding does not work without the NAT rule, as this goes out through a Wireguard tunnel. I have posted my NAT rules below. The pi-hole servers are part of the MGMT VLAN in case that is relevant. 10 and 20 are resolver VLANs and 30 is a forwarder VLAN:
[image: 1661083305616-9814b7c5-8528-4c19-bea1-5fa32c79584a-image.png]
My IOT stuff is in another VLAN, which is also a forwarder VLAN (like 30 in the screenshot), so it would be great to have a solution there to make sure that rogue devices go through pi-hole, then through the pfSense forwarder. This way I can block them in pi-hole if necessary.
Thanks for your help!