OPNsense Forum

Archive => 21.7 Legacy Series => Topic started by: leacho73 on December 30, 2021, 05:59:51 PM

Title: Route OpenVPN Server Traffic Out of Different Gateway
Post by: leacho73 on December 30, 2021, 05:59:51 PM
Hi All,

Is it possible to route OpenVPN traffic out of a different gateway other than the default one that is created when a connection is made? - etc 192.168.0.1 as the GW when connecting on a 192.168.0.x address?

I have tried assigning the OpenVPN interface and giving it an IP, but I can see how that wouldn't work with multiple servers, as you get ovpn1, 2 etc etc.

I'm trying to get NetFlow data out of OpenVPN connections, which I know isn't natively supported so I'm trying to send it through another collector, which requires routing it outside the OPNSense appliance.

Thanks
Leacho
Title: Re: Route OpenVPN Server Traffic Out of Different Gateway
Post by: koushun on December 30, 2021, 09:41:41 PM
I do not fully understand your question. But I think this is possible? Maybe this can get you started, these are from my notes from another project where I routed an entire subnet through a VPN connection:

Interfaces > Assignments. You will have multiple OpenVPN interface there??
Assign one interface which will be used as a gateway. After assignment, click the name of the interface (OPT5 or something similar).
Title: Re: Route OpenVPN Server Traffic Out of Different Gateway
Post by: leacho73 on December 31, 2021, 10:59:57 AM
Ah this is perfect @koushun - I'll give it a go this weekend. I shall report back if this works as intended!

Thanks
Leacho