OPNsense Forum

English Forums => Virtual private networks => Topic started by: cardblower on May 16, 2026, 11:46:32 AM

Title: Forcing Outbound VPN Connection to use specific gateway rather than default
Post by: cardblower on May 16, 2026, 11:46:32 AM
Hi All,

is there a way of forcing my outbound VPN connection to use a specific gateway rather than the default one?

I've tried a firewall rule (LAN and floating) to force destination traffic for the vpn endpoint to a specific gateway but that doesn't seem to work....

Any ideas?
Title: Re: Forcing Outbound VPN Connection to use specific gateway rather than default
Post by: Bob.Dig on May 16, 2026, 12:01:41 PM
For WireGuard? No. Although you could try a static route to the VPN-Endpoint-IP-address.
Title: Re: Forcing Outbound VPN Connection to use specific gateway rather than default
Post by: viragomann on May 16, 2026, 08:43:11 PM
Quote from: cardblower on May 16, 2026, 11:46:32 AMis there a way of forcing my outbound VPN connection to use a specific gateway rather than the default one?

I've tried a firewall rule (LAN and floating) to force destination traffic for the vpn endpoint to a specific gateway
On LAN?
If you're talking about a VPN client running on a LAN device, yes, this would be the proper way and should work.

But if want to force a connection from a client running on OPNsense itself to a certain gateway, you can only do this with a policy-routing rule for outbound traffic on the WAN.