VPN Field Guides ThatGuy[A]

OpenVPN field guide: one Ubuntu server, separate client certificates, and a real route test

The WireGuard lab earlier in this community is one way to build a tunnel, not the only protocol worth documenting. OpenVPN is a good fit when you need an established certificate-based client/server deployment or have to work with an existing OpenVPN estate. This guide follows the current Ubuntu Server and OpenVPN 2.6 documentation. It is a small lab, not a universal configuration file for every OS or firewall.

Start with the trust model. Create a certificate authority (CA) and protect its private key separately from the VPN gateway if you can. The server gets a server certificate and private key; each device gets its own client certificate and private key. The CA certificate can be shared, but the CA private key and each client's private key must stay secret. A lost phone is then one client to revoke, rather than a reason to share the same identity with every device. Ubuntu's Easy-RSA walk-through gives the exact generation and signing steps for the distribution's packages; follow it with your own names and check certificate expiry dates before importing anything.

On a current Ubuntu server, install the distribution packages (openvpn and easy-rsa in Ubuntu's guide). Keep a second console session open while changing networking. Ubuntu ships server and client sample configs under /usr/share/doc/openvpn/examples/sample-config-files/. Copy the server sample to /etc/openvpn/myserver.conf and inspect every active line. A basic routed server uses dev tun, proto udp, port 1194 and a distinct private pool such as 10.8.0.0/24. Set ca, cert and key to the files you actually created. Ubuntu's example also uses dh and a tls-crypt key; generate and distribute the tls-crypt key exactly as its guide describes. Do not mix tls-auth and tls-crypt lines from different old tutorials. Restrict the private-key and tls-crypt file permissions.

If clients must reach the internet through the gateway, the tunnel alone is insufficient. Enable IPv4 forwarding persistently, permit UDP 1194 in the cloud and host firewalls, and provide forwarding plus source NAT or a return route for the VPN pool. Use the firewall manager already responsible for this server; avoid overwriting an nftables or UFW ruleset from an unrelated tutorial. Add the full-tunnel redirect-gateway push only if that is your intent, and decide where DNS will be resolved. IPv6 needs its own addresses, routes and firewall policy: an IPv4 full-tunnel example does not silently cover it. Test that your original SSH path still works before enabling the service at boot.

Start the Ubuntu service for the configuration you actually named: sudo systemctl start openvpn@myserver for /etc/openvpn/myserver.conf. Look for “Initialization Sequence Completed” in the status and read sudo journalctl -u openvpn@myserver -xe if it fails. A running process is the first checkpoint; it says nothing yet about client routes or DNS.

For one Ubuntu client, Ubuntu's guide uses a client.conf based on the packaged sample and sudo systemctl start openvpn@client. Give it the CA certificate, its own cert and key, and the matching tls-crypt key. Set remote to the server's actual address and port, and match the server's proto and dev. Confirm that the client verifies it is talking to a server certificate. For Windows, macOS, iOS or Android, use a maintained OpenVPN client and import a profile containing only that device's credentials. The profile and any bundled key are secrets; do not upload them to a converter site or paste them into a support thread. Client UI and OS-level always-on behavior differ, so test the actual combination rather than assuming an imported profile creates a kill switch.

OpenVPN 2.6 negotiates data ciphers with data-ciphers; old advice to change only cipher is not a reliable way to choose a modern TLS-mode data cipher. Keep current AEAD options shared by server and clients, and do not turn on compression to make a legacy profile connect. If a client fails with a cipher-negotiation error, check both versions and their data-ciphers sets rather than weakening the server blindly. UDP is the normal first try. OpenVPN can use TCP transport when a network requires it, but TCP is not an anonymity or obfuscation guarantee and may perform worse under loss.

Finish with four tests from the same client: reach the tunnel gateway, reach a public IPv4 address, resolve a hostname through the intended resolver, then disconnect or block the endpoint and see whether traffic falls back to the local network. Check IPv6 separately. Keep the result beside each client's certificate identity. If a device is lost, revoke that certificate, publish the CRL to the running server, and verify that the old profile is rejected; deleting the file on your own laptop is not revocation.

Sources, checked 3 October 2026:
Ubuntu OpenVPN server and client walkthrough — https://ubuntu.com/server/docs/how-to/security/install-openvpn/
OpenVPN 2.6 manual — https://openvpn.net/community-docs/community-articles/openvpn-2-6-manual.html
OpenVPN certificate revocation — https://openvpn.net/community-docs/revoking-certificates.html
Ubuntu OpenVPN client implementations — https://ubuntu.com/server/docs/explanation/security/openvpn-client-implementations/

↑ 11

Обсуждение

Комментарии

3

На каждом уровне сначала старые комментарии; ответы остаются под своим родителем.

Написать Join — чтобы участвовать в обсуждении.

OpenVPN feels heavier to me than WireGuard for a single end-user box, but the cert workflow does make auditing who's connected a lot cleaner.
Ответы · 2
@daram, The per-device certs are the real value. Following the thread: revocation is the step people skip — a lost phone means publish the CRL and confirm the old profile gets rejected, not just deleting the file.
@daram, On a single box it is heavier, though most of the weight is Easy-RSA one-time setup. Where separate certs earn their keep is exactly what the guide notes: a lost phone becomes one revoke and CRL push, not a shared identity you have to replace everywhere.