OpenVPN cant find CA, key and client certificate

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.
Post Reply
OpenVPNUser125
OpenVpn Newbie
Posts: 4
Joined: Wed Jan 05, 2022 5:52 pm

OpenVPN cant find CA, key and client certificate

Post by OpenVPNUser125 » Thu Jan 06, 2022 6:34 pm

The OpenVPN GUI says it cant connect to management interface.
I checked the log file and then I saw:

Code: Select all

2022-01-06 19:18:25 WARNING: Compression for receiving enabled. Compression has been used in the past to break encryption. Sent packets are not compressed unless "allow-compression yes" is also set.
2022-01-06 19:18:25 DEPRECATED OPTION: --cipher set to 'AES-256-CBC' but missing in --data-ciphers (AES-256-GCM:AES-128-GCM). Future OpenVPN version will ignore --cipher for cipher negotiations. Add 'AES-256-CBC' to --data-ciphers or change --cipher 'AES-256-CBC' to --data-ciphers-fallback 'AES-256-CBC' to silence this warning.
Options error: --ca fails with 'ca.crt': No such file or directory (errno=2)
Options error: --cert fails with 'SudzukClient1.crt': No such file or directory (errno=2)
2022-01-06 19:18:25 WARNING: cannot stat file 'SudzukClient1.key': No such file or directory (errno=2)
Options error: --key fails with 'SudzukClient1.key': No such file or directory (errno=2)
Options error: Please correct these errors.
Use --help for more information.
However, I think I have correctly specified the path:

client.ovpn:

ca "C:\Users\Marcel\Documents\OpenVPNFiles\SudzukClient1\client\ca.crt"
cert "C:\Users\Marcel\Documents\OpenVPNFiles\SudzukClient1\client\*Client Name*.crt"
key "C:\Users\Marcel\Documents\OpenVPNFiles\SudzukClient1\client\*Client Name*.key"


There needs to be something wrong...

OpenVPNUser125
OpenVpn Newbie
Posts: 4
Joined: Wed Jan 05, 2022 5:52 pm

Re: OpenVPN cant find CA, key and client certificate

Post by OpenVPNUser125 » Thu Jan 06, 2022 6:37 pm

oops. wrong thread. Sorry

TinCanTech
OpenVPN Protagonist
Posts: 11137
Joined: Fri Jun 03, 2016 1:17 pm

Re: OpenVPN cant find CA, key and client certificate

Post by TinCanTech » Thu Jan 06, 2022 7:06 pm

This is the correct board not your other one.
OpenVPNUser125 wrote:
Thu Jan 06, 2022 6:34 pm
ca fails with 'ca.crt': No such file or directory (errno=2)
OpenVPNUser125 wrote:
Thu Jan 06, 2022 6:34 pm
ca "C:\Users\Marcel\Documents\OpenVPNFiles\SudzukClient1\client\ca.crt"
It would appear that you have not.

Besides, you have to escape back-slashes.

Please see the openvpn howto, where this is all documented.

Sparrow538
OpenVpn Newbie
Posts: 1
Joined: Sun Mar 10, 2024 10:46 pm

Re: OpenVPN cant find CA, key and client certificate

Post by Sparrow538 » Sun Mar 10, 2024 11:07 pm

I know this thread is from 2022, but just setup OpenVPN on AlmaLinux 9 per https://orcacore.com/install-openvpn-al ... vpn-server

And when I try to connect from Windows 11 using OpenVPN 2.6.9 from https://openvpn.net/community-downloads/
I'm receiving the same error as OP and below.
Checked the How-To, and didn't see these errors.

All the files are in the same directory as the .ovpn file, and even tried putting the path with / and \, and still received the same error when trying to connect.

[olog]
2024-03-10 22:38:02 WARNING: Compression for receiving enabled. Compression has been used in the past to break encryption. Sent packets are not compressed unless "allow-compression yes" is also set.
2024-03-10 22:38:02 DEPRECATED OPTION: --cipher set to 'AES-256-CBC' but missing in --data-ciphers (AES-256-GCM:AES-128-GCM:CHACHA20-POLY1305). OpenVPN ignores --cipher for cipher negotiations.
2024-03-10 22:38:02 Note: '--allow-compression' is not set to 'no', disabling data channel offload.
Options error: --ca fails with 'ca.crt': The system cannot find the file specified. (errno=2)
Options error: --cert fails with 'client.crt': The system cannot find the file specified. (errno=2)
2024-03-10 22:38:02 WARNING: cannot stat file 'client.key': The system cannot find the file specified. (errno=2)
Options error: --key fails with 'client.key': The system cannot find the file specified. (errno=2)
Options error: Please correct these errors.
Use --help for more information.
[/olog]

Code: Select all

client
dev tun
proto udp
remote (server IPv4) 1194
ca ca.crt
cert client.crt
key client.key
cipher AES-256-CBC
auth SHA512
auth-nocache
tls-version-min 1.2
tls-cipher TLS-DHE-RSA-WITH-AES-256-GCM-SHA384:TLS-DHE-RSA-WITH-AES-256-CBC-SHA256:TLS-DHE-RSA-WITH-AES-128-GCM-SHA256:TLS-DHE-RSA-WITH-AES-128-CBC-SHA256
resolv-retry infinite
compress lz4
nobind
persist-key
persist-tun
mute-replay-warnings
verb 3
Thanks

User avatar
PetervdM
OpenVpn Newbie
Posts: 8
Joined: Fri Apr 08, 2022 8:59 am

Re: OpenVPN cant find CA, key and client certificate

Post by PetervdM » Mon Mar 11, 2024 2:18 pm

from the man page:
For example on Windows, use double backslashes to represent pathnames:
secret "c:\\OpenVPN\\secret.key"
provide the FULL path to the files, and use DOUBLE \\

Post Reply