tamar wrote
I'm starting to think it's probably important for each of my users to have separate usernames and passwords to log into the OpenVPN server. After all, if someone leaves my team, I don't want them having VPN access and don't want this being distributed since it seems like this file can work for everyone.
Hi tamar,
"[T]his file can work for everyone" means YDIW, going against the
HOWTO and recommended defaults, such as
--duplicate-cn. If you set that option, don't. Only issue distinct profiles (including certificates and keys if you are generating those) per user. No two users should have the same certificate and key. And any user wanting to connect on multiple devices should have a separate key and certificate per device.
tamar wrote
I see how to do the auth-verify but I am trying to figure out how to do this so that I can create a login for each user. It's not that scalable to create different ovpn files for each person. And if I just add auth-user-pass without a username and password, then the server doesn't let them log in.
"Not that scalable," why not? You have to. It can be scripted. Our commercial solutions do exactly that.
For
--auth-user-pass there has to be an authentication backend. See
"Using alternative authentication methods" for more details.
tamar wrote
How do I create usernames/passwords on the server side that I can freely delete to remove potential security risk? With PAM, does that mean they need an account on my system? But they could still freely distribute the .ovpn, no?
System user authentication is indeed an option. If users deliberately misbehave and redistribute their VPN profile, that's a Layer 8 (political) problem which should be dealt with with appropriate action.
Until you scale the certificate/key generation as necessary, you have a far less secure VPN than it could have been. With unique keys and certificates (and commonNames) per user, you have two other options for securing against cancelled users. The OpenSSL way is to generate a Certificate Revocation List (CRL), and check that using
--crl-verify.
But openvpn also provides a simple means of server-side security:
--ccd-exclusive. A client can only authenticate successfully if there is a file with their certificate's commonName in the
--client-config-dir. It can be an empty file, or it can do other things specific to that client. But if YDIW as indicated from the start, these choices won't work for you.
Yes, there are others who have also insisted on Doing It Wrong. I don't want to help people do that.
regards, rob0