kylemanna / docker-openvpn

🔒 OpenVPN server in a Docker container complete with an EasyRSA PKI CA
https://hub.docker.com/r/kylemanna/openvpn/
MIT License
8.62k stars 2.37k forks source link

easyrsa build-client-full: /etc/openvpn/pki/openssl-easyrsa.cnf: No such file or directory #496

Open ebarault opened 4 years ago

ebarault commented 4 years ago

hi @kylemanna,

After your last docker image build (trigger by this unrelated commit on the Readme file) the easyrsa build-client-full command does not work anymore:

$ docker exec -it ovpn easyrsa build-client-full ebarault nopass

sed: /etc/openvpn/pki/openssl-easyrsa.cnf: No such file or directory
Easy-RSA error: Failed to update /etc/openvpn/pki/safessl-easyrsa.cnf

Sticking to kylemanna/openvpn:2.4 did it for us

cc: @krezreb

faxmaster commented 4 years ago

Hello! First thanks for this image which has worked flawlessly until now!. I have the same problem using latest master... Unable to create new client certs or revoke certs. As I have aarch64 architecture that isn't built on docker hub, I'm unable to build a functioning image now... Must be an update of Easyrsa that's causing the problem.

faxmaster commented 4 years ago

Regenerating all pki certificates (with ovpn_initpki) solved it for me. The problem seems to come from easyrsa update from 3.0.5 to 3.0.6 which broke compatibility with previously generated certificates (see https://github.com/OpenVPN/easy-rsa/issues/259)

bwindsor commented 4 years ago

Just for information, https://github.com/JenswBE/wolverine/commit/59a6cb6aa226e3c40a3c3a56a841dc83e322d037 change to use the old image kylemanna/openvpn:2.4 fixed this problem for me.

exNewbie commented 4 years ago

I fell into this issue and found workaround. The good point is that I didn't need to downgrade to version 2.4.

First thing first, you need to log in to the VPN container.

2 workarounds are

cd /etc/openvpn/pki/ cp -R revoked/ renewed


- Copy the missing openssl-easyrsa.cnf

cp -a /usr/share/easy-rsa/openssl-easyrsa.cnf /etc/openvpn/pki/



You should be able to add/remove client now.