1

I'm having trouble getting OpenVPN to work.

I have installed and configured OpenVPN on my centos machine and it seemed to be going fine. I followed the instructions in the following link

https://www.digitalocean.com/community/tutorials/how-to-setup-and-configure-an-openvpn-server-on-centos-6

when I try to connect with the client machine I am getting

TLS Error: TLS key negotiation failed to occur within 60 seconds

This is the entire log

Mon Mar 30 18:55:11 2015 OpenVPN 2.3.6 x86_64-w64-mingw32 [SSL (OpenSSL)] [LZO] [PKCS11] [IPv6] built on Mar 19 2015
Mon Mar 30 18:55:11 2015 library versions: OpenSSL 1.0.1m 19 Mar 2015, LZO 2.08
Enter Management Password:
Mon Mar 30 18:55:11 2015 MANAGEMENT: TCP Socket listening on [AF_INET]127.0.0.1:25340
Mon Mar 30 18:55:11 2015 Need hold release from management interface, waiting...
Mon Mar 30 18:55:11 2015 MANAGEMENT: Client connected from [AF_INET]127.0.0.1:25340
Mon Mar 30 18:55:11 2015 MANAGEMENT: CMD 'state on'
Mon Mar 30 18:55:11 2015 MANAGEMENT: CMD 'log all on'
Mon Mar 30 18:55:11 2015 MANAGEMENT: CMD 'hold off'
Mon Mar 30 18:55:11 2015 MANAGEMENT: CMD 'hold release'
Mon Mar 30 18:55:11 2015 WARNING: No server certificate verification method has been enabled.  See http://openvpn.net/howto.html#mitm for more info.
Mon Mar 30 18:55:12 2015 Socket Buffers: R=[8192->8192] S=[8192->8192]
Mon Mar 30 18:55:12 2015 UDPv4 link local: [undef]
Mon Mar 30 18:55:12 2015 UDPv4 link remote: [AF_INET]192.168.20.17:1194
Mon Mar 30 18:55:12 2015 MANAGEMENT: >STATE:1427734512,WAIT,,,
Mon Mar 30 18:56:12 2015 TLS Error: TLS key negotiation failed to occur within 60 seconds (check your network connectivity)
Mon Mar 30 18:56:12 2015 TLS Error: TLS handshake failed
Mon Mar 30 18:56:12 2015 SIGUSR1[soft,tls-error] received, process restarting
Mon Mar 30 18:56:12 2015 MANAGEMENT: >STATE:1427734572,RECONNECTING,tls-error,,
Mon Mar 30 18:56:12 2015 Restart pause, 2 second(s)
Mon Mar 30 18:56:14 2015 WARNING: No server certificate verification method has been enabled.  See http://openvpn.net/howto.html#mitm for more info.
Mon Mar 30 18:56:14 2015 Socket Buffers: R=[8192->8192] S=[8192->8192]
Mon Mar 30 18:56:14 2015 UDPv4 link local: [undef]
Mon Mar 30 18:56:14 2015 UDPv4 link remote: [AF_INET]192.168.20.17:1194
Mon Mar 30 18:56:14 2015 MANAGEMENT: >STATE:1427734574,WAIT,,,
Mon Mar 30 18:56:17 2015 SIGTERM[hard,] received, process exiting
Mon Mar 30 18:56:17 2015 MANAGEMENT: >STATE:1427734577,EXITING,SIGTERM,,

I tried disabling the firewall completely but it didn't seem to fix it.

Anyone have any idea how I could fix this?

TheLovelySausage
  • 4,183
  • 9
  • 30
  • 49
  • 1
    What's the log look like on the other end of the connection? (Also, you should fix that warning.) – derobert Mar 30 '15 at 19:08
  • 1
    we will need more info about your config, check this [link](http://openvpn.net/index.php/open-source/faq/79-client/253-tls-error-tls-key-negotiation-failed-to-occur-within-60-seconds-check-your-network-connectivity.html) for common errors. About the warning you have to put in your client config: ns-cert-type server. And check permission to your key files. – taliezin Mar 30 '15 at 21:27
  • I added the ns-cert-type server to fix that warning. Im not sure about the key file permissions though, should all the keys on the server be chmod 600? – TheLovelySausage Mar 31 '15 at 05:13
  • Did you check the server log ? – taliezin Mar 31 '15 at 10:54
  • I did a complete do over, reinstalled (the same steps) and its working now, i mustve done something wrong the first time around. Thanks a bunch guys – TheLovelySausage Mar 31 '15 at 17:32

0 Answers0