Add Users to OpenVPN Server
on Ubuntu and Pi
Server - Ubuntu - Windows - Android - VPN Users
cd EasyRSA-v3.0.6
This couldn't be easier now... used to be ridiculous in comparison.
or you could install a script to make it even easier...
https://github.com/davethepear/openvpn
don't forget to change client1 to meet your needs! (the script would be MUCH easier!)
./easyrsa gen-req client1 nopass
./easyrsa sign-req client client1
cp pki/issued/client1.crt ~/client-configs/keys/
cp pki/private/client1.key ~/client-configs/keys/
cd ~/client-configs
sudo ./make_config.sh client1
and if you want to make it easier to find...
cp ~/client-configs/files/*.ovpn ~
You may download this simple text file, use find & replace to replace "client1" with your user.
it's broken into sections as you're asked to provide input
To get rid of someone...
You only have to do this next step once...
sudo nano /etc/openvpn/server.conf
Add this to it:
crl-verify /etc/openvpn/crl.pem
Now, for removing people.
cd ~/EasyRSA-v3.0.6
./easyrsa revoke client1
type yes
Then update the dbase again... again.
./easyrsa gen-crl
sudo cp pki/crl.pem /etc/openvpn
sudo chmod 755 /etc/openvpn/crl.pem
You may verify what's in there by using this command:
openssl crl -in pki/crl.pem -text
Restart the stupid thing... the server, not the computer
sudo systemctl restart openvpn@server
The offending user shouldn't be able to login anymore.