Failover function for OpenVPN? If primary is down, choose second.

Discussion in 'Tomato Firmware' started by swealpha, Mar 12, 2019.

  1. swealpha

    swealpha New Member Member

    Do you guys know if its possible to use "failover" function for openvpn on tomato firmware?

    Other firmware works also, dont need to be tomato.

    Thank you for recommendations!

  2. Sean B.

    Sean B. Network Guru Member

    Quote from the OpenVPN docs. You can put the lines in the custom config box for the OpenVPN client:

    The OpenVPN client configuration can refer to multiple servers for load balancing and failover. For example:

    remote server1.mydomain
    remote server2.mydomain
    remote server3.mydomain
    will direct the OpenVPN client to attempt a connection with server1, server2, and server3 in that order. If an existing connection is broken, the OpenVPN client will retry the most recently connected server, and if that fails, will move on to the next server in the list. You can also direct the OpenVPN client to randomize its server list on startup, so that the client load will be probabilistically spread across the server pool.

  3. swealpha

    swealpha New Member Member

    Thank you for your reply!

    Is this only possible in tomato? It seems like tomato has not been updated for years. What do you think about that?

    Thank you again.
  4. Sean B.

    Sean B. Network Guru Member

    It's a function of OpenVPN, not Tomato. FreshTomato is current, while Toastman, Shibby etc are not.
    pedro311 and kille72 like this.
  5. swealpha

    swealpha New Member Member

    This seems to be a solution for 1 vpn client with multiple servers. I mean two vpn clients. (two different vpn providers.)

    Thank you!

    OpenWRT has something called mwan3 that has load balancer in it. Is that something tomato has?

    Thank you !
  6. eibgrad

    eibgrad Network Guru Member

    There are no such provisions for failover w/ the OpenVPN clients on tomato. To do this correctly, you'd be better off to use your own script to manage the entire process, including the start/restart/stop of the OpenVPN clients as needed. Since both OpenVPN clients are mucking w/ the default gateway, when one fails, you want to be sure to STOP that OpenVPN client from attempting a reconnect before attempting to connect the other OpenVPN client. There simply is nothing in the tomato OpenVPN client implementation like this.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice