OPNsense Forum

Archive => 22.7 Legacy Series => Topic started by: bubbagump on August 11, 2022, 05:01:31 PM

Title: Pin Wireguard to a Gateway and/or failover in multi-WAN
Post by: bubbagump on August 11, 2022, 05:01:31 PM
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.
Title: Re: Pin Wireguard to a Gateway and/or failover in multi-WAN
Post by: bubbagump on August 13, 2022, 07:21:10 PM
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."
Title: Re: Pin Wireguard to a Gateway and/or failover in multi-WAN
Post by: I3iker on August 13, 2022, 09:49:13 PM
Maybe this can help you ..



https://schnerring.net/blog/opnsense-baseline-guide-with-vpn-guest-and-vlan-support/