OPNsense Forum

English Forums => Virtual private networks => Topic started by: ciori on March 12, 2023, 11:00:45 AM

Title: Unbound DNS outgoing wireguard interface
Post by: ciori on March 12, 2023, 11:00:45 AM
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
Title: Re: Unbound DNS outgoing wireguard interface
Post by: fuskadoo on January 06, 2024, 07:44:08 AM
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.
Title: Re: Unbound DNS outgoing wireguard interface
Post by: gtt1229 on January 09, 2024, 07:48:40 PM
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.
Title: Re: Unbound DNS outgoing wireguard interface
Post by: spetrillo on January 16, 2024, 10:48:57 PM
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.