Connection Timeout, where to setup the default timeout?

This forum is for all inquiries relating to the installation of OpenVPN from source and with binaries.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Forum rules
Please visit (and READ) the OpenVPN HowTo http://openvpn.net/howto prior to asking any questions in here!
Post Reply
simu
OpenVpn Newbie
Posts: 10
Joined: Tue May 22, 2012 10:53 am

Connection Timeout, where to setup the default timeout?

Post by simu » Tue May 22, 2012 11:09 am

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

User avatar
Mimiko
Forum Team
Posts: 1564
Joined: Wed Sep 22, 2010 3:18 am

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

Post by Mimiko » Wed May 23, 2012 5:41 am

Use "keepalive 10 60" on server side configuration.
When switching from eth to ppp does eth goes dissconected or it steel remains active?

simu
OpenVpn Newbie
Posts: 10
Joined: Tue May 22, 2012 10:53 am

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

Post by simu » Thu May 24, 2012 3:06 pm

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

User avatar
Mimiko
Forum Team
Posts: 1564
Joined: Wed Sep 22, 2010 3:18 am

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

Post by Mimiko » Sat May 26, 2012 6:48 am

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.

Post Reply