Page 1 of 1

OVPN Windows Client keeps disconnecting and reconnecting

Posted: Thu Nov 03, 2011 11:52 am
by spc
Hi,


I have a few mikrotik routers connected without problems, but my windows client gets disconnected every 5 minutes the connection is lost and it reconnects again, or if i try to transfer a file to the server it disconnects and reconnects many times.

I have the client in verb5 and here is the log file
Thu Nov 03 11:33:29 2011 Initialization Sequence Completed
Thu Nov 03 11:36:30 2011 Connection reset, restarting [-1]
Thu Nov 03 11:36:30 2011 TCP/UDP: Closing socket
Thu Nov 03 11:36:30 2011 SIGUSR1[soft,connection-reset] received, process restarting
Thu Nov 03 11:36:35 2011 WARNING: No server certificate verification method has been enabled. See http://openvpn.net/howto.html#mitm for more info.
Thu Nov 03 11:36:35 2011 NOTE: OpenVPNAS 2.1 requires '--script-security 2' or higher to call user-defined scripts or executables
Thu Nov 03 11:36:35 2011 Re-using SSL/TLS context
Thu Nov 03 11:36:35 2011 Control Channel MTU parms [ L:1543 D:140 XX:40 XX:0 ET:0 EL:0 ]
Thu Nov 03 11:36:35 2011 Data Channel MTU parms [ L:1543 D:1450 XX:43 XX:4 ET:0 EL:0 ]
Thu Nov 03 11:36:35 2011 Local Options hash (VER=V4): 'db02a8f8'
Thu Nov 03 11:36:35 2011 Expected Remote Options hash (VER=V4): '7e068940'
Thu Nov 03 11:36:35 2011 Attempting to establish TCP connection with X.X.XX.XX:21
Client Config
client
proto tcp
dev tun
ca ca.crt
dh dh2048.pem
cert xxxxxxxxxx.crt
key xxxxxxxxxxxxx.key
remote xxxxxxxxxxxx 21
cipher BF-CBC
verb 5
mute 20
keepalive 10 120
persist-key
persist-tun
float
resolv-retry infinite
nobind


Openvpn config
port 21
proto tcp
dev tun

ca keys/xxxx/ca.crt
cert keys/xxxxxxx.crt
key keys/xxxxxxxxn.key
dh keys/xxxxxxx/dh2048.pem

server 172.16.100.0 255.255.255.0

client-config-dir /etc/openvpn/servers/OVPN-xxxxxxxx/ccd
ccd-exclusive

client-to-client

persist-key
persist-tun

crl-verify keys/xxxxxx/crl.pem

#ifconfig-pool-persist ipp.txt
cipher BF-CBC


keepalive 10 120

user nobody
group adm

status openvpn-status.log
log-append openvpn.log
verb 3
management localhost 7505



Thanks

Re: OVPN Windows Client keeps disconnecting and reconnecting

Posted: Fri Nov 04, 2011 7:39 am
by Mimiko
How the client is connected to internet? May be some router or firewall interferes.

Re: OVPN Windows Client keeps disconnecting and reconnecting

Posted: Fri Nov 04, 2011 10:01 am
by spc
Mimiko wrote:How the client is connected to internet? May be some router or firewall interferes.
I have tried in a few different locations, and with different internet connections, firewall is disabled.

Every time that i connect to the ftp server under vpn and try to send a file the connection starts reconnecting instantly.

Re: OVPN Windows Client keeps disconnecting and reconnecting

Posted: Fri Nov 04, 2011 11:46 am
by Mimiko
Try another ftp client, for example built in windows.
Do a repair of the system.
Reinstall OpenVPN.
Check for malicious programs.

Re: OVPN Windows Client keeps disconnecting and reconnecting

Posted: Fri Nov 04, 2011 12:59 pm
by spc
Mimiko wrote:Try another ftp client, for example built in windows.
Do a repair of the system.
Reinstall OpenVPN.
Check for malicious programs.
Thanks,

I am going also try in another computer with the same certificates.

I´ll give feedback later.

Re: OVPN Windows Client keeps disconnecting and reconnecting

Posted: Fri Nov 04, 2011 7:34 pm
by spc
Hi,

I have tried in other laptop and the problem persist, after a while or if i upload any file to server i get the vpn disconnected and reconected like a loop.

I also tried to login with my android phone and could not ping any ip addresses, and if i connect to other openvpn server i am able to ping without problems.

It seems like something in the server config is not correct or is missing.

Any help?

Re: OVPN Windows Client keeps disconnecting and reconnecting

Posted: Sun Nov 06, 2011 8:46 am
by Mimiko
If you think about server, then search interfering devices that drops connection on traffic. Some firewall, hidden proxy, traffic shaipping programs.