Use OpenVPN only for traffic from a specific subnet/interface

I'm trying to set up a system where I have LAN interface/subnet that reaches the Internet through a WAN interface, and a OPT interface/subnet that reaches the internet through a OpenVPN tunnel to a paid server (AirVPN), that is still technically reaching the internet through the same WAN interface.

I have used the openVPN GUI with Luci as I have a openvpn config file provided by AirVPN, but it seems that when I start the VPN all traffic is moved through it, both from LAN and OPT interfaces.

LAN and OPT interfaces are on different firewall interfaces as well, they are not both under LAN.

Anyone has ideas on how to do this? Can I actually do this if I dump the config from the GUI and try with ssh and uci?

You can use a pair of rule/route or use PBR package.

vpn-policy-routing package and it's associated luci app will do what you need

ok, used PBR and luci interface, thanks

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.