OPNsense Forum

Archive => 24.1, 24.4 Legacy Series => Topic started by: dlbu1987 on February 21, 2024, 01:02:27 AM

Title: Routing Unbound DNS over TLS through OpenVPN
Post by: dlbu1987 on February 21, 2024, 01:02:27 AM
Hello OPNsense Community,

I'm reaching out for some guidance on an issue I've encountered while trying to route DNS queries from Unbound over TLS through an OpenVPN connection. My goal is to ensure all DNS requests from my network are encrypted and routed through the VPN for enhanced privacy and security.

Background:
I have Unbound configured to use DNS over TLS with upstream providers like Cloudflare (1.1.1.1) to encrypt DNS queries. This setup works perfectly when Unbound is set to use the WAN interface. However, I want these DNS over TLS requests to be routed over my OpenVPN connection (specifically, a NordVPN connection configured on OPNsense).

Issue:
After changing the outgoing network interface in Unbound to the OpenVPN interface, my DNS requests started getting blocked by the system's default deny rule, as indicated by log entries showing "Default deny / state violation rule" for traffic intended for Cloudflare's DNS over TLS service on port 853.

This issue does not occur when routing DNS over the WAN interface, suggesting a specific challenge with routing encrypted DNS traffic over the VPN.

Attempts to Resolve:


Questions for the Community:


Any insights or alternative approaches to ensure DNS queries are encrypted and routed through the VPN would be greatly appreciated.

Thank you in advance for your assistance and for sharing any experiences or solutions that might help resolve this challenge.
Title: Re: Routing Unbound DNS over TLS through OpenVPN
Post by: slugsshell on April 01, 2024, 09:11:55 AM
Hi,
even this post is already two month old, I want to reply, since I run in to the exact same problem, not just with opnsense also with pfsense. The only way I got DNS over TLS running over the VPN Tunnel, was by deactivating DNSSEC Support under the unbound options.

Maybe this helps someone..