How to route to a network via 2 redundant OpenVPN tunnels

Scripts with setup, destroy, and modify routing tables and firewall rulesets for client connections.
Post Reply
scolia
OpenVpn Newbie
Posts: 2
Joined: Sun Feb 05, 2017 8:57 pm

How to route to a network via 2 redundant OpenVPN tunnels

Post by scolia » Sun Feb 05, 2017 9:10 pm

Hello all,

i have some networks connected to a OpenVPN server, each via 2 LTE routers and 2 OpenVPN tunnels.

Code: Select all

						Router 1 local: 172.25.5.1  VPN: 10.92.1.5
Network 172.25.5.0/24											VPN server 10.92.0.1
						Router 2 local: 172.25.5.2 	VPN: 10.92.2.5
I would like to be able to connect to the network 172.25.5.0/24 from the server even if one of the routers is out of order.

If i put

Code: Select all

iroute 172.25.5.0/24 
to both client's ccd's, it is only active for the newest connection. So if the newest connection fails, there is no route to the network.

I have two ideas:
  • Set up a client-disconnect script so that every time a router disconnects the connection of the other router will be killed (re-established) - so it will renew its iroute.
  • Set up two concurrent OpenVPN processes on the server side one for Router 1 and one for Router 2. So route checking and adjusting can be done by shell-script/iptables.
What do you think? Is there any smarter way to go?
Thanks in advance!

Tim

Post Reply