Maximum PC

KILLING BAD ACTORS

-

What happens when someone’s not behaving properly, and you want to remove their access to your server? The easy-rsa program enables you to revoke their access. Here’s how you do it.

The “/etc/easy-rsa/pki/index.txt” file is the “master database” of all your issued certificat­es. It will look something like this:

R 2710311943­24Z 1809201018­28Z 97913BB18D­F2BACC7004­7EE8E8AF8E­29 unknown /CN=bob

V 2710311956­53Z 082F05CAE5­3FEC2AB52D­A56C044C58­84 unknown /CN=sally

V 2802062239­22Z 1809201006­50Z C6DB4B3B0C­C7D9EF94DF­02E18444FC­2B unknown /CN=joe

A V indicates a valid certificat­e, while means that the certificat­e has been revoked. You can find the common name of the certificat­es right at the end.

Let’s say that we want to remove Joe’s access. To revoke his certificat­e, you would run the following commands:

cd /etc/easy-rsa easyrsa revoke joe easyrsa gen-crl

If you look in “index.txt,” you’ll find there’s an on Joe’s line. The easyrsa gen-crl command updates the certificat­e revocation list located in the “crl.pem” file. Now copy “/etc/easy-rsa/pki/crl.pem” to “/etc/openvpn,” add crl-verify /etc/openvpn/crl.

pem to “/etc/openvpn/server.conf,” and restart your OpenVPN server. Remember, OpenVPN is now running as user nobody, so make sure “crl. pem” is world-readable. If you’ve previously put “crl-verify” into “server.conf,” all you need to do is copy over the updated “crl.pem” file.

Newspapers in English

Newspapers from United States