OPNsense Forum

English Forums => General Discussion => Topic started by: spetrillo on August 09, 2023, 08:22:50 PM

Title: OPNsense FWs Connected via S2S VPN
Post by: spetrillo on August 09, 2023, 08:22:50 PM
I am managing two OPNsense firewalls, that are connected via a Wireguard S2S setup. Each firewall is part of its own private domain. How can I exchange DNS information between the firewalls, so I can resolve a FQDN at site B from site A?
Title: Re: OPNsense FWs Connected via S2S VPN
Post by: Maurice on August 09, 2023, 09:33:59 PM
Unbound query forwarding. At site A, forward queries for domain B to DNS server B. At site B, forward queries for domain A to DNS server A.

Cheers
Maurice
Title: Re: OPNsense FWs Connected via S2S VPN
Post by: spetrillo on August 09, 2023, 09:41:37 PM
Thanks for confirming Query Forwarding is the place. I thought so but wanted confirmation.
Title: Re: OPNsense FWs Connected via S2S VPN
Post by: spetrillo on August 09, 2023, 09:46:23 PM
Ok so I had the right query forwarding in place, but I cannot resolve a site B FQDN from site A. My DNS server in my DHCP points to the Unbound DNS server on the OPNsense firewall. Is there anything I can look at in Unbound, to see if its resolving the query or passing it?
Title: Re: OPNsense FWs Connected via S2S VPN
Post by: Maurice on August 09, 2023, 10:00:28 PM
I'd first test whether you can actually access DNS server B from site A. At site A, go to Interfaces: Diagnostics: DNS Lookup and enter a site B FQDN and DNS server IP address.
Title: Re: OPNsense FWs Connected via S2S VPN
Post by: spetrillo on August 09, 2023, 11:53:56 PM
Strange....DNS Lookup gets nothing but if I ping the DNS server at site B(10.0.1.1) it responds to my firewall at site A(192.168.1.1).

This is really confusing to me...
Title: Re: OPNsense FWs Connected via S2S VPN
Post by: Maurice on August 10, 2023, 12:28:06 AM
Maybe Unbound ACLs are enabled?
Title: Re: OPNsense FWs Connected via S2S VPN
Post by: spetrillo on August 10, 2023, 07:21:47 PM
No ACLs in place and default action is to allow.

Under Unbound/Advanced there is a config option for private domains, so I filled it in on both firewalls. Site A has its domain listed first and then Site B domain name. Site B its reversed.
Title: Re: OPNsense FWs Connected via S2S VPN
Post by: Maurice on August 11, 2023, 01:14:08 PM
No need to manually add private domains, query forwarding automatically does this.

So still no joy?
Title: Re: OPNsense FWs Connected via S2S VPN
Post by: spetrillo on August 11, 2023, 02:33:32 PM
No joy in Mudville!

So another question. Site B's fw is actually behind an ISP router. Do I need to port forward 53 on the ISP router, like I did with the port for the WG connection?
Title: Re: OPNsense FWs Connected via S2S VPN
Post by: Maurice on August 11, 2023, 03:22:10 PM
No! You want to tunnel DNS through WireGuard, why would you open port 53 to the world?

Running out of ideas. Unbound network interfaces are set to 'All (recommended)'?
Title: Re: OPNsense FWs Connected via S2S VPN
Post by: spetrillo on August 11, 2023, 03:31:44 PM
I didn't mean on the ISP router. Should I forward port 53 across the WG interface in OPNsense?
Title: Re: OPNsense FWs Connected via S2S VPN
Post by: Maurice on August 11, 2023, 04:03:12 PM
Quote from: spetrillo on August 11, 2023, 02:33:32 PM
Do I need to port forward 53 on the ISP router [...]?
Quote from: spetrillo on August 11, 2023, 03:31:44 PM
I didn't mean on the ISP router.

Okay then.

Quote from: spetrillo on August 11, 2023, 03:31:44 PM
Should I forward port 53 across the WG interface in OPNsense?

Sorry, I have no idea what you mean.

You have started a bunch of threads about setting up WireGuard, none if which are marked as solved. Which implies your tunnel might not yet be properly set up, tested and fully working. Before you dive into the upper layers (like DNS), you should make sure the foundation is solid.

Last post, good luck.
Title: Re: OPNsense FWs Connected via S2S VPN
Post by: spetrillo on August 11, 2023, 04:50:00 PM
As mentioned the S2S connection is stable and I can pass IPs back and forth. What does not seem to work is the DNS aspect of this, even with the forwarder in place on both sides. DNS Lookup on OPNsense seems to indicate a network error, so that's why I asked about port forwarding 53 through the WG interface in OPNsense.

Anyways thank you for your time...onwards and upwards to a solution.