OpenVPN / openvpn3-linux

OpenVPN 3 Linux client
GNU Affero General Public License v3.0
563 stars 151 forks source link

Failed to connect to server #170

Closed JoshuaJakowlew closed 1 year ago

JoshuaJakowlew commented 1 year ago

Hello, I'm using openvpn3 client with linux. I have .ovpn file and can't connect to server. The same config file works with OpenVPN connect on my Windows laptop and Android phone.

After providing credentials openvpn3 session-start --config ~/Documents/client.ovpn just hangs.

openvpn3 log --log-level 6 --config ~/Documents/client.ovpn gives me the following message:

2023-03-01 15:02:08 [STATUS] Connection, Configuration OK: config_path=/net/openvpn/v3/configuration/b9b8d821x0849x4072xb5c0x9553d0eb9a49
2023-03-01 15:02:08 Client INFO: Starting connection
2023-03-01 15:02:08 [STATUS] Connection, Client connecting
2023-03-01 15:02:08 Client INFO: Connecting
2023-03-01 15:02:08 [STATUS] Connection, Client connecting
2023-03-01 15:02:08 Client !! CRITICAL !!: Certificate verification failed:OpenSSLContext::SSL::read_cleartext: BIO_read failed, cap=2576 status=-1: error:0A000086:SSL routines::certificate verify failed
2023-03-01 15:02:08 [STATUS] Connection, Client connection failed: Certificate verification failed

As far as I understand, there are some troubles with certificate verification. But the same config file works flawlessly on other machines.

I tried these openvpn3, openvpn3-git, but nothing changes.

This config file worked for me on this linux machine about half a year ago, so, I assume, this problem may be related to some updates of openvpn3 client.

dsommers commented 1 year ago

Can you extract the <cert> and <ca> fragments from your config and run it through an openssl command?

 $ openssl x509 -noout -text -in cert.pem
 $ openssl x509 -noout -text -in ca.pem

Please share the output of them. You may obfuscate the Subject, Issuer and similar lines having a "DN" reference. But everything else must be intact.

schwabe commented 1 year ago

I think it is the remote server certificate the client complains about

dsommers commented 1 year ago

Closing due to no activity or responses.