Dear StackExchange community,
I have an OpenVPN 2.3.10 sever runnig with ubuntu 16.04 with multiple clients (~ 80) installed with the Digital Ocean tutorial . When I revoke a certificate it can still connect like before....
My server config :
port 1197
proto udp
dev tun3
ca ca.crt
cert server.crt
key server.key # This file should be kept secret
dh dh2048.pem
topology subnet
server XXX.XXX.XXX.XXX XXX.XXX.XXX.XXX
local XXX.XXX.XXX.XXX
ifconfig-pool-persist ipp.txt
client-config-dir ccd
keepalive 10 120
tls-auth ta.key 0
key-direction 0
cipher AES-128-CBC
auth SHA256
comp-lzo
user nobody
group nogroup
persist-key
persist-tun
status-version 2
status openvpn-status4.log
log-append openvpn.server4.log
verb 3
management 127.0.0.1 5558
crl-verify crl/crl.pem
For certificate management i use easy-rsa.
cd ~/openvpn-ca
source vars
To create a certificate : ./build-key cert_name
To revoke certificate : ./revoke-full cert_name
then i copy the crl.pem
file in the keys
dir in /etc/openvpn/crl
directory and I change ownership sudo chown nobody:nogroup /etc/openvpn/crl/crl.pem
The relevent server log:
TLS: Initial packet from [AF_INET]XXX.XXX.XXX:60341, sid=4af4c75c e17bc520
CRL: CRL crl/crl.pem is from a different issuer than the issuer of certificate C=FR, ST=company_name, L=company_name, O=company_name, OU=company_name, CN=company_name, name=server, emailAddress=admin@company.com
VERIFY OK: depth=1, C=FR, ST=company_name, L=company_name, O=company_name, OU=company_name, CN=company_name, name=server, emailAddress=admin@company.com
CRL: CRL crl/crl.pem is from a different issuer than the issuer of certificate C=FR, ST=company_name, L=company_name, O=company_name, OU=company_name, CN=client_name, name=server, emailAddress=admin@company.com
VERIFY OK: depth=0, C=FR, ST=company_name, L=company_name, O=company_name, OU=company_name, CN=client_name, name=server, emailAddress=admin@company.com
If i do ./list-crl
i can see that my certifcate is indeed revoked :
Certificate Revocation List (CRL):
Version 1 (0x0)
Signature Algorithm: sha256WithRSAEncryption
Issuer: /C=FR/ST=company_name/L=company_name/O=company_name/OU=company_name/CN=test2/name=server/emailAddress=admin@company.com
Last Update: Jun 10 09:03:59 2020 GMT
Next Update: Jun 8 09:03:59 2030 GMT
Revoked Certificates:
Serial Number: 02
Revocation Date: Feb 13 15:48:55 2018 GMT
Serial Number: 03
Revocation Date: Feb 13 15:50:38 2018 GMT
Serial Number: 04
Revocation Date: Feb 13 15:58:06 2018 GMT
Serial Number: 05
Revocation Date: Feb 13 16:59:54 2018 GMT
Serial Number: 06
Revocation Date: Feb 13 17:00:01 2018 GMT
Serial Number: 07
Revocation Date: Feb 13 17:06:43 2018 GMT
Serial Number: 28
Revocation Date: Jul 9 13:24:14 2018 GMT
Serial Number: 29
Revocation Date: Jul 9 13:24:30 2018 GMT
Serial Number: 32
Revocation Date: Jun 9 07:25:35 2020 GMT
Serial Number: 58
Revocation Date: Jun 9 07:26:01 2020 GMT
Serial Number: 59
Revocation Date: Jun 9 07:26:19 2020 GMT
Serial Number: 9B
Revocation Date: Jun 9 15:13:52 2020 GMT
Serial Number: 9C
Revocation Date: Jun 9 14:47:36 2020 GMT
Signature Algorithm: sha256WithRSAEncryption
XXXXX
I can see one stange thing : CN=test2 in the Issuer: block but i can't find where that comes from.
This situations is a bit confusing, for now i manage to block the client by iptables thus it can connect to VPN but cannot access anything, but i'd rather solve that revocation issue.
Have you any idea ?
Thank you.