Should clients query other nameservers directly themselves, a NAT redirect rule to 127.0.0.1:53 (the local Unbound service) can be used to force these requests over TLS.
Disabling clients from using their own DoT, DoH, or DoQ is a complicated matter. Against DoT you have Zenarmor. Against DoQ you can block QUIC in Zenarmor. But DoH blocking is a lot more complicated, unless you have an exhaustive list of all DoH servers. The problem is that anyone may start a DoH server, so such list is never foolproof.Correction: Zenarmor blocks DoH, not DoT. But the problem that anyone may create their own DoH server persists. DoH is indistinguishable from regular HTTPS traffic. Technically, Zenarmor can inspect HTTPS connections, but that breaks much of the internet and smartphone apps.
root@opnsense:~ # tcpdump -i lo0 -n port 53tcpdump: verbose output suppressed, use -v[v]... for full protocol decodelistening on lo0, link-type NULL (BSD loopback), snapshot length 262144 bytes15:03:35.584046 IP6 2003:a:d59:******.18249 > ::1.53: 63442+ [1au] A? www.heise.de. (53)15:03:40.585240 IP6 2003:a:d59:******.48087 > ::1.53: 63442+ [1au] A? www.heise.de. (53)
2024-08-25T15:03:45 Notice unbound [55765:0] notice: sendmsg failed: Invalid argument