Page 1 of 2

Please help "TLS failed:TLS handshake failed"

Posted: Tue Nov 25, 2014 4:16 pm
by Anson0
Problem:TLS failed:TLS handshake failed,
Client:Ubuntu 14.04LTS 64bit
VPS Server:Debian 7 32bit,OPENVZ

Server.conf:
Image
Client.conf:
Image
Server.log
Image
Client.log
Image

I am a novice to vpn,it is already over 2 weeks since I purchased VPS service,but I still fail to build my openvpn,I donot know how to debug this problem,and even donot know where to start,please guide me solve my problem,any help will certainly be appreciated.

Re: Please help "TLS failed:TLS handshake failed"

Posted: Wed Nov 26, 2014 6:30 am
by maikcat
for testing disable your servers firewall.

Michael.

Re: Please help "TLS failed:TLS handshake failed"

Posted: Wed Nov 26, 2014 12:46 pm
by Anson0
Both my server and client had already removed the iptables rules,and ufw is disabled,
iptables -L output:

Chain INPUT (policy ACCEPT)
target prot opt source destination

Chain FORWARD (policy ACCEPT)
target prot opt source destination

Chain OUTPUT (policy ACCEPT)
target prot opt source destination

Re: Please help "TLS failed:TLS handshake failed"

Posted: Wed Nov 26, 2014 1:45 pm
by maikcat
the connection refused messages indicate that traffic is dropped...

Michael.

Re: Please help "TLS failed:TLS handshake failed"

Posted: Wed Nov 26, 2014 2:32 pm
by Anson0
Then what is the solution,please

Re: Please help "TLS failed:TLS handshake failed"

Posted: Wed Nov 26, 2014 4:43 pm
by maikcat
traffic is dropped,
switch to tcp and check if this changes anything.

Michael.

Re: Please help "TLS failed:TLS handshake failed"

Posted: Wed Nov 26, 2014 5:50 pm
by Anson0
In client.conf&server.conf,after change to use Proto tcp&dev tap,still fail to work,here below is log for your information
server.log:Image
client.log:Image

Re: Please help "TLS failed:TLS handshake failed"

Posted: Wed Nov 26, 2014 8:25 pm
by john56477
The Problem is the Chinese GFW

You need to install a special version of openvpn with a patch. On both the Client and Server side.
This patch introduces a scramble, so the GFW inspection does not see its openvpn.

Without patch, Currently, The Chinese Government also try to
establish another connection, presume to try and install exploit
or break-in. You need to be aware of this.


There are few ways to install patched openvpn,
CentOS
======
Auto install script for Centos 6/6.5 (post made for 2.3.2)
http://lowendtalk.com/discussion/23555/ ... ler-script

Debian/Ubuntu
===========
Install from source code (post made for 2.3.4)
http://vpnchinaopenvz.wordpress.com/201 ... or-ubuntu/

Install from deb package for Debian or Ubuntu
http://vpnchinaopenvz.wordpress.com/201 ... ng-sbuild/
http://vpnchinaopenvz.wordpress.com/201 ... version-2/

Re: Please help "TLS failed:TLS handshake failed"

Posted: Thu Nov 27, 2014 12:44 pm
by Anson0
Michael,Morning!What is your opinion,do you agree with John?

Re: Please help "TLS failed:TLS handshake failed"

Posted: Thu Nov 27, 2014 12:51 pm
by Anson0
Michael,Morning!What is your opinion,do you agree with John?

Re: Please help "TLS failed:TLS handshake failed"

Posted: Thu Nov 27, 2014 12:53 pm
by Anson0
Michael,I would like try your solution,hope you can find out what is the problem cause.

Re: Please help "TLS failed:TLS handshake failed"

Posted: Thu Nov 27, 2014 1:36 pm
by maikcat
your Ip's come from china so yes john's suggestion might work for you..

Michael.

Re: Please help "TLS failed:TLS handshake failed"

Posted: Thu Nov 27, 2014 1:51 pm
by Anson0
Hi Michael,thanks anyway.But I donot think I would like to try john's solution.
Previously,about 2 days ago,I was trying to post this problem in "Configuration" section,but still not find my post on that section,it seems my post was not passing your filter,which probably because I have this active post of same topic in this section,could you plz advise how can I successfully post this topic in "Configuration" section,there seems more active,maybe i can find suitable solution?

Re: Please help "TLS failed:TLS handshake failed"

Posted: Thu Nov 27, 2014 4:41 pm
by maikcat
i saw the second post you made and i disaproved it since i was answering this one.

just move it under configuration section.

Michael.

Re: Please help "TLS failed:TLS handshake failed"

Posted: Fri Nov 28, 2014 4:12 am
by john56477
Fair enough, actually you don't need to install a new special openvpn,
you can use standard openvpn and route it via SSH or stunnel, or any other encrypted tunnel
one limitation is, it only works for TCP, does not work for UDP.

in client script add (if ssh listen port is 8080)
socks-proxy localhost 8080

change to TCP on both server and client (and restart server)
proto TCP
;proto UDP

Also, the International Connections out of China are hopeless,
I hear, often the only time to get proper connection
to US is between 2 AM and 7 AM Chinese time.

Before you try and connect, Check that there is actual
bandwidth connection.
Use site http://www.speedtest.net/ and pick a server in the
country where the VPS is. If the test result is less than
.3 mpbs download, its not the GFW, its just poor international network.

Re: Please help "TLS failed:TLS handshake failed"

Posted: Fri Nov 28, 2014 12:49 pm
by Anson0
Michael,that is very kind of you,thanks for moving my post under "Configuration"section.I am reading openvpn introduction,hope to get the principal how the openvpn works.Happy Black Friday!

Re: Please help "TLS failed:TLS handshake failed"

Posted: Fri Nov 28, 2014 12:52 pm
by Anson0
Michael,that is very kind of you,thanks for moving my post under "Configuration"section.I am reading openvpn introduction,hope to get the principal how the openvpn works.Happy Black Friday!

Re: Please help "TLS failed:TLS handshake failed"

Posted: Sat Nov 29, 2014 5:24 pm
by Anson0
Michael,could you please advise why 1194 port is not open in client,and how to enable this port in client?And for the server,why 1194 port is listening 0.0.0.0,I think it should listening on my server address?
Image
Image

Re: Please help "TLS failed:TLS handshake failed"

Posted: Sun Nov 30, 2014 4:44 pm
by maikcat
Michael,could you please advise why 1194 port is not open in client
why the port should be open in your CLIENT????

And for the server,why 1194 port is listening 0.0.0.0,I think it should listening on my server address?
did you use the local directive on your config?
by default openvpn listens on ALL available interfaces.

Michael.

Re: Please help "TLS failed:TLS handshake failed"

Posted: Mon Dec 01, 2014 11:42 am
by Anson0
Michael,thank you very much for clarification,I was wrongly thinking both server and client should open port 1194.
And now,i also now server 1194 port listening on 0.0.0.0 is normal.Your post is of great help to me.Thanks again.