Failover and VPN using at the same time

sample.png
I’m new in mikrotik and configuration of routers. I have this situation:

I’m trying to used 2 WAN in mikrotik router , and one of then, has a static IP (used to vpn connections). I want to configurate a failover between the 2 WANs,

  • WAN A: is the main internet provider, this is the principal WAN used.
  • WAN B: is the secondary with the VPN entry connections to the LAN
  • LAN A: is the lan to connect with the vpn

The issue is when i try to used the vpn connection, the router change the main WAN A to the WAN B, so all the traffic is on the WAN B. It’s possible configurate the router, to use the vpn connection in the WAN B, and the LAN default output was the WAN A.

Nice drawing already.

What might help others to help you is an export of your config.

Is the VPN terminated on the MT router or on a server on the LAN?

a. If the former then you need to ensure traffic coming in ISP2 goes out WAN2 when the router responds…
b. If the latter you need to ensure traffic coming in ISP2 goes out WAN2 when the LAN device responds…

In either case you will have to mangle.