It was working fine a couple of days ago, but suddenly it stopped working.
First, I started getting this error on the clients:
Certificate has EKU (str) TLS Web Server Authentication, expects TLS Web Server Authentication
I hadn’t changed anything on the client or DietPi, the error appeared out of the blue.
So I uninstalled OpenVPN and PiVPN and tried to re-install them using dietpi-software.
The first sign that something was wrong was an error message during the install:
Can't open /etc/openvpn/easy-rsa/keys/index.txt.attr for reading, No such file or directory
1995810208:error:02001002:system library:fopen:No such file or directory:../crypto/bio/bss_file.c:74:fopen('/etc/openvpn/easy-rsa/keys/index.txt.attr','r')
1995810208:error:2006D080:BIO routines:BIO_new_file:no such file:../crypto/bio/bss_file.c:81:
However the install proceeded after this error.
After the reboot, trying to run pivpn -a I get:
cat: /etc/pivpn/INSTALL_USER: No such file or directory
Enter a Name for the Client:
Then it tries to copy the ovpn file to “/home//ovpns”.
I created the INSTALL_USER file and wrote my username inside it, this stopped that first error message and it copies the file to /home//ovpns instead.
Now it fails at:
Write out database with 1 new entries
Data Base Updated
spawn openssl rsa -in pki/private/grew.key -aes128 -out pki/private/grew.key
Enter pass phrase for pki/private/grew.key:
writing RSA key
Enter PEM pass phrase:
Verifying - Enter PEM pass phrase:
Client's cert found: grew.crt
Client's Private Key found: grew.key
CA public Key found: ca.crt
tls-auth Private Key found: ta.key
cat: Default.txt: No such file or directory
========================================================
Done! grew.ovpn successfully created!
I do get the .ovpn file now, but it doesn’t contain any OpenVPN settings, just the certificates/keys. Not what I would call “successfully” created.