OPNsense Forum

English Forums => Virtual private networks => Topic started by: Neo on April 12, 2021, 01:41:07 am

Title: Multiple VPN/Routes using same VPN Provider
Post by: Neo on April 12, 2021, 01:41:07 am
I have multiple VPN clients configured to connect to separate servers in different areas (US-Atlanta, CA-Vancouver, UK-London, etc.) and want to route traffic via these specific tunnels (exit points) based on source network or, in some cases, service/ports...

All these clients are using the same VPN provider and while each connection gets assigned a different virtual IP (10.x.x.y) all connections appear to be assigned the same gateway IP (10.x.x.1) no matter which server is being connected to...

The gateway created for the 1st VPN interface will display the IP for the virtual network (10.x.x.1) but the 2nd connection will display no IP for the VPN gateway even though the connection is "up" and all other aspects appear normal and functional...

I'm assuming this behavior may be related to multiple tunnels being on the same "virtual subnet" and all having the same IP for upstream gateway (i.e. VPN1 = 10.1.2.101, VPN2 = 10.1.2.102, Gateway for both = 10.1.2.1)...

I'm not sure if this behavior is normal/expected, if I've found a bug or limitation, or if this setup is just not viable on OpnSense...

Has anyone set something like this up using a public VPN provider?

All connections are OpenVPN using UDP and each connection "works" as long as I only try to use one at a time... Is there any work-around for this scenario? Is there, for example, a way to route via the assigned VPN interface instead of by gateway?

Title: Re: Multiple VPN/Routes using same VPN Provider
Post by: juere on April 16, 2021, 08:29:42 am
Have you tried to untick "Upstream Gateway" and tick "Far Gateway" (using IP 10.x.x.1) in gateway configuration for all VPN Gateways ?
Have nor tried this, but it might work :)