OPNsense Forum

Archive => 22.1 Legacy Series => Topic started by: pes on March 06, 2023, 06:41:30 AM

Title: Wireguard with two WAN
Post by: pes on March 06, 2023, 06:41:30 AM
I have OPNsense version: 22.1.8_1-amd64
I setup WireGuard on the OPNSense box with tho WAN and I am able to connect and access the LAN side hosts, etc. However, it only works with the WAN which is currently the default gateway. If that WAN is down, then OPNSense switches the default gateway (gateway switching is enabled) and WireGuard peers can utilize the 2nd WAN to connect. However, as long as WAN1 is "up", peers cannot connect to WAN2. Well, actually the peers appear to be able to connect to WAN2 but traffic isn't properly received (a few bytes are received but no network services such as ping, ssh, etc. work).

Can anyone point me in the right direction of how to setup WireGuard on OPNSense such that peers can connect to either WAN interface?
Title: Re: Wireguard with two WAN
Post by: tiermutter on March 06, 2023, 07:39:34 AM
I cannot remember that I configured something special, but it works fine for me using multi WAN for failover only.
Do you use policy based routing? Enabled reply-to? Disabled sticky connection?
The only special thing I do is that I have different WG peers for WAN and LTE as I cannot add more than one DDNS for the endpoint. However, I am using the same WG server instance for both connections.