I didn't even know that DoH used that many ports. I thought it was just the typical 80 and 433. I'll give it a whirl and see how it work on my network. Thanks.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts MenuQuote from: patient0 on June 17, 2025, 06:57:05 AMThe alias that I use in the NAT rule that allows the Pi-hole servers to use the Unbound service on Opnsense, only has the IPv4 and LLA IPv6 of each Pi-hole server. If the Pi-hole server uses any of thier GUA IPv6 address to try to query the Unbound service on Opnsense, Opnsense would just forward (NAT) that request back to the Pi-hole server since the GUA is not in the alias of that NAT rule. I can see that happen on a regular basis in the logs, but again, I don't see (yet?) any appear to be a infinite loop. I've yet to see the issue crop up again so far since removing the ULA prefix (which the Pi-holes were also using) from my network.Quote from: Mpegger on June 13, 2025, 10:14:47 PMIs it possible that Opnsense can get into a infinite loop with the DNS server(s)?I'm really not sure, in what scenario would you think that a loop be possible? The flow should be either 'client - pi-hole - unbound' or 'client - OPNsense - pi-hole - unbound'. Would there be a situation where unbound sends a request to pi-hole?
Quote from: patient0 on June 13, 2025, 10:36:15 AMYou redirect does work, indeed.It does show as originating from Opnsense when the request gets redirected (NAT).
If I remember correctly, in the case of a device trying to query (let's say) 1.1.1.1, on pi-hole the originating client is listed as OPNsense, since it is forwarded from OPNsense. Is that not so? That is why I thought it would be helpful to have logging for one or all of these rules enabled, temporarly.
If you now manually query 1.1.1.1 from a client, what does the pi-hole show as the client?
Quote from: patient0 on June 12, 2025, 06:42:26 AMQuoteMy IPv4 LAN is on a single /24, no vLANs or seperate subnetsThat means if something (virus/malware/rough application/script) is trying to contact a public DNS directly, it will show up on the pi-holes as if the query came from OPNsense but it may really be originating from a client.
LAN TCP/UDP ! DNS_IPv4 * * 53 (DNS) DNS_IPv4 53 (DNS) DNS redirect IPv4
LAN TCP/UDP ! DNS_IPv6 * * 53 (DNS) DNS_IPv6 53 (DNS) DNS redirect IPv6 In IPv4+6 TCP/UDP DNS_Server * * 53 (DNS) * * Allow Pihole to contact Unbound
In IPv4 TCP/UDP ! DNS_IPv4 * DNS_IPv4 53 (DNS) * * DNS redirect IPv4
In IPv6 TCP/UDP ! DNS_IPv6 * DNS_IPv6 53 (DNS) * * DNS redirect IPv6
In IPv4+6 TCP/UDP * * * 53 (DNS) * * Reject all DNS to WAN and Unbound Quote from: patient0 on June 12, 2025, 05:45:54 AMIf a client makes a DNS request to OPNsense instead of pi-hole, do you still see the client as the requester on pi-hole? Meaning: your pi-holes are on a different subnet and you NAT the requests?My IPv4 LAN is on a single /24, no vLANs or seperate subnets. However, in your example, the origin should show as Opnsense, but again, I have Unbound (on Opnsense) behind a firewall rule. Only the 2 Pi-hole DNS servers can connect to it. Any other port 53 attempts (IPv4 & IPv6) through the gateway (Opnsense) get redirected (NAT) to the Pi-holes.
Server: dns.lan.internal
Address: fe80::xxxx:xxxx:xxxx:xxxx
Non-authoritative answer:
Name: opnsense.lan.internal
Addresses: xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx
192.168.2.1
xxx.xxx.xxx.xxx