I normally rotate between two identical Linksys EA7300 v2 routers, and so I did to upgrade from 23.05.4 to 24.10.0.
This at first look seemed to work without a hitch. On second look my two OpenVPN tunnels did not work. I was able to fix one of them, but the other refused with this error:
VERIFY ERROR: depth=1, error=self-signed certificate in certificate chain: C=DE, ST=Bavaria, L=Munich, O=B-5 Colocation Administration, CN=B-5 Colocation Administration CA, emailAddress=admin@ns.b-5.de, serial=12118597303198206453
I did quite a bit of searching around but most people who got the same error did not notice it. Just like @ mgazzinin his thread.
I found one (hopefully) solution: Small OpenVPN setup with peer-fingerprint. I have not tried this yet because I ran out of steam. I'll try tomorrow when my boiler has enough pressure
Strangely only one of the tunnels works without this problem. I had to generate new certs on the other machine because the certificates were too old. They all had this: Signature Algorithm: sha1WithRSAEncryption`. Well, they are about seven years old... So I assume that the certs on the other host (generated in August 2024) are OK because they were generated by an older version of easy-rsa. The two hosts run parallel on Debian 12 aka bookworm.
I'm posting this now in the hope that somebody ran into the same and found a solution and to report when (hopefully) I find one.
Plan B is currently to generate the certs on the machine that has working certs. But IIRC we upgraded to bookworm after August 2024, so the certs may not work either.
You are trying to use a CA certificate as the client certificate. This will not work. Certificates with the CA flag set can only be used as the CA. The top level CA is always self-signed.
As OpenVPN is upgraded to higher versions, they like to deprecate encryption methods that are deemed insecure, and refuse to connect when old algorithms are involved. SHA1 is likely to suffer that fate soon if it hasn't already.
You are referring to the CN, the Common Name. That is just a name and yes, I forgot to remove the CA. But that's just two characters and a space. The CA flag is found here:
The CA having the same CN as the user certificate is a problem. Within the certificate it says "name" signed by "name" i.e. self-signed. The file names do not matter. All certificates in the system (that aren't an exact copy being reused on multiple clients, which is allowed but not recommended) need unique CN.