Page 1 of 1

Connection Timeout, where to setup the default timeout?

Posted: Tue May 22, 2012 11:09 am
by simu
Hi all,
i'm using TCP to connect a client to a server instead of UDP. On my configuration the default route interface is changing through an underlaying failover process. That means that i switch over from a fixed line connection (eth0) to dialup connection (ppp0).
The --ping 10 and --ping-restart 60 option on the client is activated. So i'm looking forward to a the behaviour of openvpn, that after a switch over from eth0 to ppp0 it should restart after 60 seconds. But nothing happend. After aprox. 16minutes openvpn messages an error like this:

Code: Select all

May 22 09:32:39 ovpn_cons228129[17070]: read TCPv4_CLIENT [NO-INFO]: Connection timed out (code=110)
But why after 16minutes and not after 60seconds?
any idesas?
BR
simu

Re: Connection Timeout, where to setup the default timeout?

Posted: Wed May 23, 2012 5:41 am
by Mimiko
Use "keepalive 10 60" on server side configuration.
When switching from eth to ppp does eth goes dissconected or it steel remains active?

Re: Connection Timeout, where to setup the default timeout?

Posted: Thu May 24, 2012 3:06 pm
by simu

Code: Select all

Use "keepalive 10 60" on server side configuration
does not made any changes. I think it is a client problem or does "keepalive 10 60" push anything other to the client?

Code: Select all

When switching from eth to ppp does eth goes dissconected or it steel remains active?
when switching from eth to ppp the eth is still there but has no link (cable unplugged). any ideas?
BR
Simu

Re: Connection Timeout, where to setup the default timeout?

Posted: Sat May 26, 2012 6:48 am
by Mimiko
does "keepalive 10 60" push anything other to the client?
Yes, see the manual for the commands that are pushed to clients.
(cable unplugged)
When cable is unplaged, the OpenVPN does not see this. A connection error will be detected, when some data will try to send, for example by "keepalive" pings. If there is no "keepalive", only when some other application will try to send something to the OpenVPN server IP only, as when the cable is unplaged, the system will modify routing table and all default traffic will go thru ppp, but OpenVPN will not be aware about this.

You can use "keepalive 10 60" in the client too.