Pin Wireguard to a Gateway and/or failover in multi-WAN

Started by bubbagump, August 11, 2022, 05:01:31 PM

Previous topic - Next topic
August 11, 2022, 05:01:31 PM Last Edit: August 11, 2022, 05:33:25 PM by bubbagump
I am wondering how I can pin Wireguard to a gateway and/or cause it to fail over in a multi-WAN setup. This is only for outbound considerations as inbound - create the NAT and off I go.

After thinking about this for a few days and poking at docs, I don't think OPNSense offers an explicit way to do this. What I ended up doing that gets me most of the way there....

Wireguard will use the default gateway and has no concept of a gateway group. Therefore I simply set the priority of the WAN link I wanted to use for Wireguard to have priority and enabled "Allow default gateway switching."