OpenVPN client backup option, help!

Dear Mikrotik guru’s,

My main Mikrotik router is connected to ISP router with static ip address.
Other routers are connecting to main Mikrotik using EOIP tunnel and OVPN client.
In OVPN client setup “Connect to:” ip address is that static IP address of main Mikrotik.

However sometimes ISP’s router with static IP is down and i need to replace it with alternative internet connection with dynamic IP.
By doing so, all my routers connected to main Mikrotik router will not be able to connect because of ip address change.

My question is, can I somehow create backup OVPN client connection, and on failure I want all my routers to try to connect to second one.

The second one will be dyndns or no-ip address if possible?

If you’re willing to convert your architecture to routed and remove the EOIP tunnels, the simplest option would be as follows:

  1. Have your alternative Internet connection register to a dynamic DNS name, and make sure that your clients are running at least v6.4 and have one or more valid DNS servers configured to use.
  2. Make sure your OVPN tunnels are operating in IP mode. Configure your clients with two OVPN tunnels up all the time. Configure routes on both sides of the link so that the OVPN tunnel across the Primary Internet connection is preferred. This can be done either via static or dynamic routing (dynamic routing is probably preferable if you have many sites). You may also want to turn the “keepalive interval” on your OpenVPN server lower, to ensure the interfaces fail faster (and thus routing switches over to the working tunnel) in the case of an outage.

It may also be possible to maintain the OVPN>EOIP setup that I assume you’re using for bridging the remote and main sites together, using bonding in “active backup” mode – I haven’t tested using that setup, so YMMV (test it before you go live!)