TLS Error: TLS handshake failed

Official client software for OpenVPN Access Server and OpenVPN Cloud.
Post Reply
omgwtf
OpenVpn Newbie
Posts: 5
Joined: Thu Feb 20, 2014 1:17 am

TLS Error: TLS handshake failed

Post by omgwtf » Thu Feb 20, 2014 1:31 am

I hope you guys can help me solve this issue because I'm frankly out of ideas.

I tried regenerating other certifications but it still won't work. Here is my server config and my log file.

server.conf

Code: Select all

port 1194 #- port
proto udp #- protocol
dev tap0
tun-mtu 1500
tun-mtu-extra 32
mssfix 1450
reneg-sec 0
ca /etc/openvpn/easy-rsa/keys/ca.crt
cert /etc/openvpn/easy-rsa/keys/server.crt
key /etc/openvpn/easy-rsa/keys/server.key
dh /etc/openvpn/easy-rsa/keys/dh1024.pem
plugin /usr/lib64/openvpn/plugin/lib/openvpn-auth-pam.so /etc/pam.d/login #- Comment this line if you are using FreeRADIUS
#plugin /etc/openvpn/radiusplugin.so /etc/openvpn/radiusplugin.cnf #- Uncomment this line if you are using FreeRADIUS
client-cert-not-required
username-as-common-name
server 10.8.0.0 255.255.255.0
push "redirect-gateway def1"
push "dhcp-option DNS 8.8.8.8"
push "dhcp-option DNS 8.8.4.4"
push "route 10.0.0.0 255.255.255.0"
keepalive 5 30
comp-lzo
persist-key
persist-tun
status 1194.log
verb 3

Code: Select all

Feb 19 19:38:50 centos openvpn[2894]: x.x.x.x:22177 TLS: Initial packet from [AF_INET]X.X.X.X:22177, sid=618a5ae5 2e$
Feb 19 19:38:52 centos openvpn[2894]: x.x.x.x:22177 TLS Error: Auth Username/Password was not provided by peer
Feb 19 19:38:52 centos openvpn[2894]: X.X.X.X:22177 TLS Error: TLS handshake failed
Feb 19 19:38:52 centos openvpn[2894]: X.X.X.X:22177 SIGUSR1[soft,tls-error] received, client-instance restarting
Feb 19 19:39:50 centos openvpn[2894]: X.X.X.X:22177 TLS: Initial packet from [AF_INET]X.X.X.X:22177, sid=4c12dd32 d7$
Feb 19 19:39:52 centos openvpn[2894]: X.X.X.X:22177 TLS Error: Auth Username/Password was not provided by peer
Feb 19 19:39:52 centos openvpn[2894]: X.X.X.X:22177 TLS Error: TLS handshake failed
Feb 19 19:39:52 centos openvpn[2894]: X.X.X.X:22177 SIGUSR1[soft,tls-error] received, client-instance restarting
And here's my android config file

Code: Select all

 
management /data/data/de.blinkt.openvpn/cache
mgmtsocket unix
management-client
management-query-passwords
management-hold

setenv IV_GUI_VER "de.blinkt.openvpn 0.6.8"
machine-readable-output
client
verb 4
connect-retry-max 5
connect-retry 5
resolv-retry 60
dev tun
remote x.x.x.x 1194 upd
<ca>
</ca>
<key>
</key>
<cert>
</cert>
comp-lzo
redirect-private block-local
route-ipv6 ::/0
route 0.0.0.0 0.0.0.0 vpn_gateway

omgwtf
OpenVpn Newbie
Posts: 5
Joined: Thu Feb 20, 2014 1:17 am

Re: TLS Error: TLS handshake failed

Post by omgwtf » Thu Feb 20, 2014 8:17 pm

Those aren't my comments, sample file that I downloaded ? :)

And it doesn't ask me for a username/password.

omgwtf
OpenVpn Newbie
Posts: 5
Joined: Thu Feb 20, 2014 1:17 am

Re: TLS Error: TLS handshake failed

Post by omgwtf » Thu Feb 20, 2014 8:36 pm

Those aren't my comments, sample file that I downloaded ? :)

And it when it does ask me for a username and password it just doesn't authenticate.

I put in the username and password and it asks again for that info. Do I need to specify somewhere in the openvpn config file the username and password allowed to vpn into the server ? I thought it uses the local usersname and password that are on the linux system.

Code: Select all

Feb 20 15:33:29 centos openvpn[23596]: OpenVPN 2.3.2 x86_64-redhat-linux-gnu [SSL (OpenSSL)] [LZO] [EPOLL] [P$
Feb 20 15:33:29 centos openvpn[23596]: Diffie-Hellman initialized with 1024 bit key
Feb 20 15:33:29 centos openvpn[23596]: Socket Buffers: R=[124928->131072] S=[124928->131072]
Feb 20 15:33:29 centos openvpn[23596]: ROUTE_GATEWAY 192.168.10.1/255.255.255.0 IFACE=eth2 HWADDR=00:0c:29:95$
Feb 20 15:33:29 centos openvpn[23596]: TUN/TAP device tun0 opened
Feb 20 15:33:29 centos kernel: tun0: Disabled Privacy Extensions
Feb 20 15:33:29 centos openvpn[23596]: TUN/TAP TX queue length set to 100
Feb 20 15:33:29 centos openvpn[23596]: do_ifconfig, tt->ipv6=0, tt->did_ifconfig_ipv6_setup=0
Feb 20 15:33:29 centos openvpn[23596]: /sbin/ip link set dev tun0 up mtu 1500
Feb 20 15:33:29 centos openvpn[23596]: /sbin/ip addr add dev tun0 local 10.8.0.1 peer 10.8.0.2
Feb 20 15:33:29 centos openvpn[23596]: /sbin/ip route add 10.8.0.0/24 via 10.8.0.2
Feb 20 15:33:29 centos openvpn[23607]: GID set to nobody
Feb 20 15:33:29 centos openvpn[23607]: UID set to nobody
Feb 20 15:33:29 centos openvpn[23607]: UDPv4 link local (bound): [undef]
Feb 20 15:33:29 centos openvpn[23607]: UDPv4 link remote: [undef]
Feb 20 15:33:29 centos openvpn[23607]: Initialization Sequence Completed
Feb 20 15:33:35 centos openvpn[23607]: event_wait : Interrupted system call (code=4)
Feb 20 15:33:35 centos openvpn[23607]: OpenVPN CLIENT LIST
Feb 20 15:33:35 centos openvpn[23607]: Updated,Thu Feb 20 15:33:35 2014
Feb 20 15:33:35 centos openvpn[23607]: Common Name,Real Address,Bytes Received,Bytes Sent,Connected 
Feb 20 15:33:35 centos openvpn[23607]: ROUTING TABLE
Feb 20 15:33:35 centos openvpn[23607]: Virtual Address,Common Name,Real Address,Last Ref
Feb 20 15:33:35 centos openvpn[23607]: GLOBAL STATS
Feb 20 15:33:40 centos openvpn[23607]: 192.168.10.1:51754 TLS: Initial packet from [AF_INET]192.168.10.1:51754, sid=db3cc2cb 95403a77
Feb 20 15:33:59 centos openvpn[23607]: 192.168.10.1:58338 TLS: Initial packet from [AF_INET]192.168.10.1:58338, sid=9108f8f2 3f5981cd
Feb 20 15:34:24 centos openvpn[23607]: 192.168.10.1:58339 TLS: Initial packet from [AF_INET]192.168.10.1:58339, sid=311e1e9c 91ce0aa7
Feb 20 15:34:32 centos openvpn[23607]: 192.168.10.1:58340 TLS: Initial packet from [AF_INET]192.168.10.1:58340, sid=33ee7f5c c577cd03
Feb 20 15:34:38 centos openvpn[23607]: 192.168.10.1:51753 TLS Error: TLS key negotiation failed to occur within 60 seconds (check your network connectivity)
Feb 20 15:34:38 centos openvpn[23607]: 192.168.10.1:51753 TLS Error: TLS handshake failed
Feb 20 15:34:38 centos openvpn[23607]: 192.168.10.1:51753 SIGUSR1[soft,tls-error] received, client-instance restarting
Feb 20 15:34:40 centos openvpn[23607]: 192.168.10.1:51754 TLS Error: TLS key negotiation failed to occur within 60 seconds (check your network connectivity)
Feb 20 15:34:40 centos openvpn[23607]: 192.168.10.1:51754 TLS Error: TLS handshake failed
Feb 20 15:34:40 centos openvpn[23607]: 192.168.10.1:51754 SIGUSR1[soft,tls-error] received, client-instance restarting

omgwtf
OpenVpn Newbie
Posts: 5
Joined: Thu Feb 20, 2014 1:17 am

Re: TLS Error: TLS handshake failed

Post by omgwtf » Thu Feb 20, 2014 9:24 pm


omgwtf
OpenVpn Newbie
Posts: 5
Joined: Thu Feb 20, 2014 1:17 am

Re: TLS Error: TLS handshake failed

Post by omgwtf » Thu Feb 20, 2014 9:40 pm

I have tried using this

Code: Select all

plugin /usr/share/openvpn/plugin/lib/openvpn-auth-pam.so login
and also

Code: Select all

plugin /usr/share/openvpn/plugin/lib/openvpn-auth-pam.so /etc/pam.d 
neither worked

This is strange, I connected to the openvpn web interface and when I type username type myuser it posts

Code: Select all

ERROR: no username is currently needed at this time

Post Reply