Community discussions

MikroTik App
 
User avatar
ragno
just joined
Topic Author
Posts: 20
Joined: Fri Aug 07, 2015 2:04 pm

OpenVPN taking to long changing to WAN2

Sat Apr 22, 2017 5:07 am

Hi,

I have a Mikrotik that has an OpenVPN server running. There are 2 WANs and I want to set a failover for OpenVPN client computers.
Bellow is the .ovpn that I set in Windows client. The problem is that when the WAN1 fail, it takes 120s (average) to cycle to the next wan available (WAN2).

Is it possible to reduce this time and the OpenVPN chooses the WAN2 faster?
client
dev tun
proto tcp
remote wan1.mycompany.com 443
remote wan2.mycompany.com 443
resolv-retry infinite
nobind
persist-key
persist-tun
ca ca.crt
cert client.crt
key client.key
remote-cert-tls server
cipher AES-256-CBC
auth SHA1
auth-user-pass
route 192.168.1.0 255.255.255.0 10.100.100.1 1
verb 3
 
User avatar
ragno
just joined
Topic Author
Posts: 20
Joined: Fri Aug 07, 2015 2:04 pm

Re: OpenVPN taking to long changing to WAN2

Sat Apr 22, 2017 6:11 am

I discovered the trick.

Just adding a new line "connect-timeout 10" solved the problem and reduced to 10s the time to wait for a response before trying the next server.