Unbound DNS outgoing wireguard interface

Started by ciori, March 12, 2023, 11:00:45 AM

Previous topic - Next topic
Hi, I was wondering if it is possible to configure Unbound DNS so that every DNS query will be sent through a specific wireguard tunnel.

I can see there is the "outgoing network interfaces" setting in "Unbound DNS -> General", but even if I set it to only the wireguard interface I am interested in (in this case it's a Wireguard VPN Provider I set up following the standard OPNsense guides in the doc), those DNS queries are still going out the WAN interface (I can see they originate from my public IP).

Am I doing something wrong? Is there some Routes, Firewall or NAT rules that needs to be added?

I have a pretty standard configuration of OPNsense and I only added the wireguard tunnel (where basically the router is the client of the VPN provider acting as the server).

Thanks

It looks like "outgoing network interfaces" was removed completely.  I just moved over from pfsense and really surprised this is missing now.  Did you find another way to do this?  It's pretty critical.

There is still Outgoing Network Interfaces located under Unbound DNS -> General -> (Enable advanced mode) -> second from the bottom of the page.


The help prompt shows the following "Note that setting explicit outgoing interfaces only works when they are statically configured."

So I assume we are unable to specify outgoing interfaces that do not have a static IP?

After I set the outgoing interfaces, nothing changed, so I setup routes, but I have 2 interfaces I want to send request from, and static routes won't support that.

I am curious about this...bc I am trying to exchange DNS between two sites on each side of a Wireguard tunnel. I query forward in Unbound but I cannot resolve by name. IP resolution works great.