I fully understand what you are trying to achieve. The problem is that your questions are still based on assumptions that don't quite reflect how DNS and network security work today - 8 years after the initial post has been made.
First, the choice of DHCP server (ISC, Dnsmasq, Kea) is largely independent of the question of enforcing "old-style" DNS resolution through OPNsense. So, in this sense, the guide is still applicable.
But there is a much more fundamental issue:
Redirecting traditional DNS queries on TCP/UDP port 53 is relatively straightforward. Preventing DNS leaks in general is an entirely different matter.
Clients may use DNS over TLS, DNS over HTTPS, DNS over QUIC, application-specific resolvers, VPN tunnels, or other mechanisms to bypass your local DNS infrastructure. Some of these can be blocked relatively easily; others cannot be reliably distinguished from legitimate traffic by ordinary firewall rules. Some of the limitations have been discussed in the course of this thread.
Restricting your network to IPv4 doesn't eliminate these problems, either.
So before trying to apply a supposedly working set of specific firewall rules, you need to define what you actually want to enforce:
- Prevent accidental DNS leaks from normally configured clients?
- Prevent applications from using alternative DNS resolvers?
- Prevent deliberately non-compliant clients from bypassing your DNS policy?
These are very different objectives, requiring different approaches, with different limitations.
There is no universal set of firewall rules that guarantees all DNS resolution will pass through your local resolver while otherwise allowing unrestricted Internet access.
Until those limitations are understood and the actual objective is clearly defined, a step-by-step configuration guide would only create a false sense of security on your part.
First, the choice of DHCP server (ISC, Dnsmasq, Kea) is largely independent of the question of enforcing "old-style" DNS resolution through OPNsense. So, in this sense, the guide is still applicable.
But there is a much more fundamental issue:
Redirecting traditional DNS queries on TCP/UDP port 53 is relatively straightforward. Preventing DNS leaks in general is an entirely different matter.
Clients may use DNS over TLS, DNS over HTTPS, DNS over QUIC, application-specific resolvers, VPN tunnels, or other mechanisms to bypass your local DNS infrastructure. Some of these can be blocked relatively easily; others cannot be reliably distinguished from legitimate traffic by ordinary firewall rules. Some of the limitations have been discussed in the course of this thread.
Restricting your network to IPv4 doesn't eliminate these problems, either.
So before trying to apply a supposedly working set of specific firewall rules, you need to define what you actually want to enforce:
- Prevent accidental DNS leaks from normally configured clients?
- Prevent applications from using alternative DNS resolvers?
- Prevent deliberately non-compliant clients from bypassing your DNS policy?
These are very different objectives, requiring different approaches, with different limitations.
There is no universal set of firewall rules that guarantees all DNS resolution will pass through your local resolver while otherwise allowing unrestricted Internet access.
Until those limitations are understood and the actual objective is clearly defined, a step-by-step configuration guide would only create a false sense of security on your part.
"