Please help "TLS failed:TLS handshake failed"

Need help configuring your VPN? Just post here and you'll get that help.

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.
Anson0
OpenVpn Newbie
Posts: 14
Joined: Tue Nov 25, 2014 1:56 pm

Please help "TLS failed:TLS handshake failed"

Post by Anson0 » Tue Nov 25, 2014 4:16 pm

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.

User avatar
maikcat
Forum Team
Posts: 4200
Joined: Wed Jan 12, 2011 9:23 am
Location: Athens,Greece
Contact:

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

Post by maikcat » Wed Nov 26, 2014 6:30 am

for testing disable your servers firewall.

Michael.

Anson0
OpenVpn Newbie
Posts: 14
Joined: Tue Nov 25, 2014 1:56 pm

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

Post by Anson0 » Wed Nov 26, 2014 12:46 pm

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

User avatar
maikcat
Forum Team
Posts: 4200
Joined: Wed Jan 12, 2011 9:23 am
Location: Athens,Greece
Contact:

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

Post by maikcat » Wed Nov 26, 2014 1:45 pm

the connection refused messages indicate that traffic is dropped...

Michael.

Anson0
OpenVpn Newbie
Posts: 14
Joined: Tue Nov 25, 2014 1:56 pm

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

Post by Anson0 » Wed Nov 26, 2014 2:32 pm

Then what is the solution,please

User avatar
maikcat
Forum Team
Posts: 4200
Joined: Wed Jan 12, 2011 9:23 am
Location: Athens,Greece
Contact:

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

Post by maikcat » Wed Nov 26, 2014 4:43 pm

traffic is dropped,
switch to tcp and check if this changes anything.

Michael.

Anson0
OpenVpn Newbie
Posts: 14
Joined: Tue Nov 25, 2014 1:56 pm

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

Post by Anson0 » Wed Nov 26, 2014 5:50 pm

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

john56477
OpenVPN User
Posts: 27
Joined: Tue Nov 06, 2012 12:02 am

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

Post by john56477 » Wed Nov 26, 2014 8:25 pm

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/

Anson0
OpenVpn Newbie
Posts: 14
Joined: Tue Nov 25, 2014 1:56 pm

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

Post by Anson0 » Thu Nov 27, 2014 12:44 pm

Michael,Morning!What is your opinion,do you agree with John?

Anson0
OpenVpn Newbie
Posts: 14
Joined: Tue Nov 25, 2014 1:56 pm

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

Post by Anson0 » Thu Nov 27, 2014 12:51 pm

Michael,Morning!What is your opinion,do you agree with John?

Anson0
OpenVpn Newbie
Posts: 14
Joined: Tue Nov 25, 2014 1:56 pm

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

Post by Anson0 » Thu Nov 27, 2014 12:53 pm

Michael,I would like try your solution,hope you can find out what is the problem cause.

User avatar
maikcat
Forum Team
Posts: 4200
Joined: Wed Jan 12, 2011 9:23 am
Location: Athens,Greece
Contact:

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

Post by maikcat » Thu Nov 27, 2014 1:36 pm

your Ip's come from china so yes john's suggestion might work for you..

Michael.

Anson0
OpenVpn Newbie
Posts: 14
Joined: Tue Nov 25, 2014 1:56 pm

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

Post by Anson0 » Thu Nov 27, 2014 1:51 pm

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?

User avatar
maikcat
Forum Team
Posts: 4200
Joined: Wed Jan 12, 2011 9:23 am
Location: Athens,Greece
Contact:

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

Post by maikcat » Thu Nov 27, 2014 4:41 pm

i saw the second post you made and i disaproved it since i was answering this one.

just move it under configuration section.

Michael.

john56477
OpenVPN User
Posts: 27
Joined: Tue Nov 06, 2012 12:02 am

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

Post by john56477 » Fri Nov 28, 2014 4:12 am

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.

Anson0
OpenVpn Newbie
Posts: 14
Joined: Tue Nov 25, 2014 1:56 pm

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

Post by Anson0 » Fri Nov 28, 2014 12:49 pm

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!

Anson0
OpenVpn Newbie
Posts: 14
Joined: Tue Nov 25, 2014 1:56 pm

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

Post by Anson0 » Fri Nov 28, 2014 12:52 pm

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!

Anson0
OpenVpn Newbie
Posts: 14
Joined: Tue Nov 25, 2014 1:56 pm

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

Post by Anson0 » Sat Nov 29, 2014 5:24 pm

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

User avatar
maikcat
Forum Team
Posts: 4200
Joined: Wed Jan 12, 2011 9:23 am
Location: Athens,Greece
Contact:

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

Post by maikcat » Sun Nov 30, 2014 4:44 pm

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.

Anson0
OpenVpn Newbie
Posts: 14
Joined: Tue Nov 25, 2014 1:56 pm

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

Post by Anson0 » Mon Dec 01, 2014 11:42 am

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.

Locked