Force VPN to Dial Out over specific interface

Hi

I have successfully set up an OpenVPN interface which is working fine.

It appears in the interface list and I can route specific clients over that interface according to their private IP address by setting a routing mark in the Mangle.

So far so good.

However, I have two WAN interfaces and I would like to have control over which WAN interface the VPN traffic is routed over.

I have experimented by setting different routing distances for each WAN and I have discovered that the VPN interface attaches to the WAN interface with the lowest distance parameter when the VPN is enabled.

If I swap the routing distances and disable and enable the VPN interface it attaches to the other WAN interface.

That level of control is fine for a single VPN interface, but I would like to set up another VPN interface that would always use the other WAN interface.


Is there a better way of forcing a VPN interface to use a specific WAN interface that give more control?

Thank you

Why not do this in a routing table?

I assume that the VPN server you are dialing to has an IP. So for example: Dst address: 92.58.48.145 gateway 192.168.1.253. That means all traffic from your PC or router with a destination 92.58 etc… will go through 192.168.1.253. (of course, you should put here your own IP’s of the gateway).

Thanks for response

I don’t think that will work as a routing mark is needed to attach the client to the VPN interface

The VPN interface appears in the routing list just like a WAN interface.

If I attach a routing mark to send the client over (say) WAN2 then the client does not get routed through the VPN.

I have attached a screenshot of my route list from Winbox
route_list.png