Avoid dropping of connection

This forum is for admins who are looking to build or expand their OpenVPN setup.

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

Forum rules
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
Post Reply
genlight
OpenVpn Newbie
Posts: 4
Joined: Tue Mar 08, 2011 1:33 pm

Avoid dropping of connection

Post by genlight » Tue Mar 08, 2011 1:42 pm

Is there a proper way to install openvpn server or what is the proper script so that if the wireless connection type changes it will not drop the connection.

Douglas
Forum Team
Posts: 285
Joined: Wed Aug 27, 2008 2:41 am

Re: Avoid dropping of connection

Post by Douglas » Tue Mar 08, 2011 9:27 pm

genlight wrote:Is there a proper way to install openvpn server or what is the proper script so that if the wireless connection type changes it will not drop the connection.
If your connection changes, or rather, your IP.. the connection will always drop..

genlight
OpenVpn Newbie
Posts: 4
Joined: Tue Mar 08, 2011 1:33 pm

Re: Avoid dropping of connection

Post by genlight » Thu Mar 10, 2011 12:29 am

I think my Ip will not change because I am already connected with that on the server with the vpn connection. So I am isolating the cause of the problem on the connection signal type.

The situation here is that when the wireless modem signal type change from hsdpa to 3g or to wcdma or to any signal type or vice versa, the vpn connection will immediately drop.

Please kindly help me out guys about this problem.


Moreover, can you also guide me how I can make the vpn connection faster and with lowest latency possible. Thank you very much.

I am not very good using openvpn, I am a beginner reading and learning on this site. Some of what I do to solve my problem is googling but unfortunately not all answers to my question can be found there so I ask for your assistance and guidance guys.

Thank you in advance.

User avatar
janjust
Forum Team
Posts: 2703
Joined: Fri Aug 20, 2010 2:57 pm
Location: Amsterdam
Contact:

Re: Avoid dropping of connection

Post by janjust » Thu Mar 10, 2011 7:06 am

if your internet connection changes, i.e. your non-VPN IP changes, then the VPN connection will always be dropped - this is a security measure and there's very little you can do about it.
If you can switch from 3g to CDMA to etc without being assigned a new IP address (from the ISP) then the openvpn connection should survive short interruptions (especially when configured using 'proto udp').

genlight
OpenVpn Newbie
Posts: 4
Joined: Tue Mar 08, 2011 1:33 pm

Re: Avoid dropping of connection

Post by genlight » Thu Mar 10, 2011 7:16 am

someone told me to change my mtu to 1492 and lower my TTL in my server conf file so that it will help the dropping problem. do you agree?

What is the proper ttl for that? and where to edit that TTL.

User avatar
janjust
Forum Team
Posts: 2703
Joined: Fri Aug 20, 2010 2:57 pm
Location: Amsterdam
Contact:

Re: Avoid dropping of connection

Post by janjust » Thu Mar 10, 2011 8:42 am

AFAIK there is no concept of TTL (time to live) in openvpn; I don't know of any way to alter "the TTL" in the server config.
If dropped connections are your main concern then I'd start out with

Code: Select all

fragment 1400
(for UDP based connections). For TCP based connections I'd use

Code: Select all

tun-mtu 1400
I'd avoid messing with the tun-mtu unless you absolutely have to.

Post Reply