Thanks for the nice and complete write-up!
I noticed a few minor issues with the server and client configuration files:
push "compress lz4"
I usually bundle all the certificates and keys along with the client configuration in a .ovpn file, which I find easier to transfer around and use.
Thank you very much for your feedback! I will update the article when I will have some time.
About the compression part, I learnt it is now considered as unsecured thanks to voracle vulnerability, I will probably explain it briefly and disable in the configuration offered because security is the first criteria.
Thank you very much for your feedback again :)
The article is now edited, I added a lot of things, feel free to read it again.
I’ve used OpenVPN for years, but the whole setup and maintenance process looks outdated. Recently started using Wireguard in production which is quick to set up and hardly requires any maintenance. It also works well in containerized world.
 - https://www.wireguard.com
Unfortunately there’s not yet kernel support for Wireguard, so maintenance is higher than it would be otherwise (e.g. dependence upon wireguard maintainer keeping out of tree module up to date for latest kernels, and you (or your distro) having to build it out of tree).
It seems like he’s close to getting it merged though, so I’m holding out for that!
wireguard-go might also be usable, if maximum performance is not required. I wouldn’t think it would be any slower than openvpn, which is also user-space.
Most distributions provide a kernel module since years. The burden of maintaining such a tiny piece of code is moderate and it does not impact admin and end users.
Maybe in this one specific case, but I’ve been burned in the past by relying on an out of tree module (or set of patches), only to have the developer lose interest, sell out, whatever. (e.g. grsec). It’s rare I suppose, but the burden on users and admins is high when it does happen.
(the same fate could happen to patches/modules in the tree, but it’s much more rare)
I do not think you can compare now Wireguard and OpenVPN in term of reliability. Wireguard is still something new, does not be audited by security team yet and does not have a strong maintainability process. A little quote from the authors:
As of June 2018 the developers of WireGuard advise treating the code and protocol as experimental, and caution that they have not yet achieved a stable release compatible with CVE tracking of any security vulnerabilities that may be discovered.
WireGuard has received formal verification from the developers , audited by , and reviewed by kernel developers and distributions that ship the kernel module.
I don’t have numbers on the number of reviewers versus SLOC count but I suspect it could be much higher than OpenVPN given the size of WireGuard
They’re saying that because they’re trustworthy, security folks. We always advise to say don’t trust it until proven otherwise with strong review and/or verification. There’s been some impressive results in verifying Wireguard on top of the fact that it’s so much smaller than competing implementations.
For now, I’ll just give you this article for some nice comparisons. Also, that article says OpenVPN is about 600,000 lines of code. The most-secure systems were thousands to tens of thousands of lines of code because smaller systems are easier to bulletproof. I don’t need to look at OpenVPN’s security advisories to know it will have more errors with more complexity.
It would be quite useful if the article explained why they are doing things a certain way, why you should copy and paste this particular config. It’s not that I don’t trust them, but I’d prefer to have the illusion of understanding the configurations I piece together.
The --auth option is not used when you use --tls-crypt and AES-256-GCM according to the OpenVPN manual page. What I did is set its value to none.
It is perfectly true, thank your for your comment, I edited the configuration.
The CRL procedure should be documented also. I came across a team who assumed that deleting the certification from “key” directory was enough to lock out users. Additionally an explanation of the meaning of flags found in the “index.txt” would be nice :-)
Addendum: another part that I find missing and misunderstood by admin teams is the”proper” way of certification creation. Users should issue a CSR and have it signed. Most real world uses I came across, the admin just issues everything and sends the OVPN file. Very common anti-pattern.
I wanted to write an article about the entire lifecycle of openvpn and user management. Yours is close though.
Nice job nevertheless!
I totally agree, I will update it when I have some time.
Thank you for your comment :)
It is now documented, thank you.
bookmarked, thanks for sharing! :)
Why use easyrsa over, for example, GnuPG, which is probably already installed?
I use easyrsa because it is the tool recommended by OpenVPN and developped by them. It is also really easy to use even if it does not provide the best algorithms available.
It has been about a year now. Is this guide still valid?
It is, very few things change and I updated it.