Setting Up an OpenVPN Server with PKI and LDAP for Corporate VPN Access

Employees and contractors lose access to internal systems due to manual certificates and scattered accounts. We set up corporate VPN on OpenVPN turnkey: single sign-on through your user directory, automatic access provisioning and revocation upon termination. Onboarding new people is reduced from hours to minutes, and manual certificate operations are eliminated entirely.

Our competencies:

Frequently Asked Questions

Latest works

  • Development of a web application for FEEDME
    Development of a web application for FEEDME
    1359
  • Development of an online store for the company FURNORO
    Development of an online store for the company FURNORO
    1330
  • B2B Advance company logo design
    B2B Advance company logo design
    776
  • Development of a web application for Enviok
    Development of a web application for Enviok
    1077
  • AIDER company logo development
    AIDER company logo development
    1022
  • CRM development for Chasseurs
    CRM development for Chasseurs
    1113

OpenVPN: where corporate access breaks and why

Corporate VPN does not break at launch — it breaks in the third month of operation.

An employee switches from office Wi-Fi to a mobile network — the session drops, the tunnel is re-established from scratch, and half of the internal services remain unavailable until you restart the client manually.

In a distributed team this happens dozens of times a day, and every disconnect means lost context, an interrupted deployment, and a support ticket.

The second point of failure is certificates. When PKI is managed manually, revoking access for a departed employee turns into a quest: find their certificate in the list, remember to update the CRL, hand out a new config to everyone else.

Skip a step — and the revoked key keeps opening access to the internal network. The flip side: mass certificate renewal once a year paralyzes operations, because everyone changes configs at the same time.

The third problem is the lack of a single point of entry. People connect with different clients, with different profiles, to different gateways, and no one sees the overall picture: who is on the network right now, through which node, from which device. Diagnosing a connection failure turns into a back-and-forth of "well, it works for me."

Here is how this gets solved: managed PKI with automatic revocation, a single gateway with directory-based authentication, and a configuration that survives a network switch without dropping the session.

What Managed VPN Access on OpenVPN Delivers

OpenVPN is a mature platform for corporate remote access, and its main advantage lies not in the protocol itself but in the managed infrastructure built around it: a dedicated PKI for certificates, integration with an LDAP directory, and predictable access provisioning. Let's break down the measurable effects this delivers in practice.

Speed of Onboarding a New Employee

With manual issuance of keys and certificates, onboarding a new person takes hours: you need to generate a key pair, sign a certificate, hand over the config, and verify it.

After LDAP integration, the directory account becomes the single source of truth — the employee gains access the moment they are added to the right group, and revocation happens just as automatically upon removal. Onboarding time drops from hours to minutes, and manual key operations disappear from the process.

Centralized Authentication and Session Resilience

When authentication goes through the directory rather than through local lists on each node, an entire class of failures disappears: out-of-sync accounts, "forgotten" access for departed employees, duplicate records.

Sessions survive reconnection without losing state, and the share of successful connection establishments no longer depends on who edited the configuration and when. This directly reduces the number of support requests.

Fewer Failures Thanks to PKI

A dedicated certificate authority with a well-thought-out issuance and revocation policy eliminates manual errors: every certificate has a lifetime, a purpose, and a clear revocation procedure.

Combined with tunnel health monitoring, this provides a predictable picture — the engineer can see where a connection drops before the user reports it.

The result is managed access that scales with the team and requires no manual intervention for every change. Describe your task: number of users, current directory, segmentation requirements — we'll come back with an assessment and an implementation plan.

VPN Access Deployment Options: Comparing Approaches

The choice of mode determines not only traffic routing, but also how authentication will be structured, which access policies will have to be maintained, and where the point of failure will end up. Below are four schemes that are most often chosen between when building corporate access.

Option When it fits Limitations
Full tunnel Remote employees work with internal systems from untrusted networks; unified traffic and policy control is needed All traffic goes through the gateway — it becomes a bottleneck and a single point of failure; the load on the channel grows
Split tunnel Access is needed only to internal resources, while the rest of the traffic (video calls, external services) goes directly Harder to guarantee policy: part of the traffic bypasses control, careful routing and leak protection are needed
Site-to-site Connecting offices, branches, or sites into a single network without a client on each device Requires coordinated subnets and stable channels on both sides; scales worse with frequent changes
Access through a gateway Publishing specific services for contractors and partners without granting them access to the network Limited to the set of published applications; does not replace full access to the infrastructure

In practice, the schemes are combined: full tunnel — for administrators and remote employees, split tunnel — for those who need only internal systems, site-to-site — between sites, gateway — for external contractors.

PKI and LDAP operate on top of any mode: the certificate confirms the device, the directory confirms the user and their groups.

Let's break down how this is deployed and which access policies are established at each level.

Stages of OpenVPN Implementation with PKI and LDAP

Implementation begins not with installing packages, but with an inventory: who connects from where today, which services are available remotely, where static keys and "perpetual" certificates that no one has revoked already exist.

At this step, we capture segmentation requirements — who needs only the internal perimeter, who needs access to admin subnets — and determine which directory will be the source of truth for accounts.

Without this step, the role and routing scheme will be guesswork, and it will have to be redone on live traffic.

  1. Access audit. We compile a connection map, a list of groups and current exceptions, and check how rights are issued and revoked today. The output is a list of roles and a clear matrix of "who goes where."
  2. Scheme design. We define the topology: a single entry point or several, how subnets are separated, where the trust boundary lies, whether a separate perimeter is needed for contractors. We fix the client addressing scheme and the routes that will be issued.
  3. PKI setup. We deploy our own certificate authority, issue root and intermediate certificates, configure templates for server and client certificates, lifetimes, and revocation lists. We separately define the revocation procedure: a terminated employee or a lost laptop must lose access immediately, not after the certificate expires.
  4. LDAP integration. We connect the directory as an authentication source, map directory groups to VPN rights, and configure filters by department and attributes. This way, an account is created and blocked in one place, not in two systems.
  5. Scenario testing. We run real cases: a new employee onboarding, a transfer between departments, access revocation, simultaneous connections from different devices, behavior when the directory is unavailable. We look not only at "grants access or not," but also at what exactly is visible in the logs for incident investigation.
  6. Handover and documentation. We hand over configurations, the PKI scheme, instructions for issuing and revoking certificates, and the procedure for failures. We conduct administrator training so that certificate rotation and connection troubleshooting do not require us.

The order matters: PKI and the directory are configured before the first users enter the system, otherwise certificates will have to be reissued and clients reconfigured on the production perimeter.

What the customer receives after configuration

The deliverable is a working environment that can be handed over to operations, not a set of files "for review." Below we list exactly what remains with you after handover.

  • Server and client profile configurations: separate templates for regular employees, contractors, and service nodes, with ready-to-use connection endpoints and routing parameters.
  • Network diagram with tunnel addressing, availability zones, and routes to internal services — so a new engineer understands the topology without calling the author.
  • Access policies: mapping directory groups to subnets and ports, traffic separation rules, restrictions for external contractors.
  • Certificate issuance and revocation procedures: who issues them, upon which request, validity period, and the procedure for blocking upon termination or device loss.
  • Instructions for the support team: common requests, diagnostic procedures, what to do in case of a mass connection failure.
  • Documentation on backing up configurations and restoring the service after a failure.
  • Acceptance checklist: which checks to run to make sure the accesses work and the unnecessary ones are closed.

Each artifact is aligned with your processes: group names, certificate validity periods, and blocking rules are taken from your directory service, not from a generic template. That is why the handover to support happens without rewriting for reality.

We separately record the change log and control points — so that during the next expansion there is no need to reconstruct the logic from the revision history.

Case study: how we reduced connection time and eliminated manual certificates

The client — a manufacturing company with distributed sites — came with two pain points: employee certificates were issued manually, and sessions dropped when switching between networks.

At the start, we recorded the "before" metrics: issuing a single certificate took an administrator 15–20 minutes, and onboarding ten people added up to half a working day, while revoking access upon termination could drag on for a day — the certificate continued to work until it was revoked manually.

We deployed OpenVPN with our own public key infrastructure, but the key step was linking it to the corporate LDAP directory.

Now the account and group membership determine who is allowed access to which subnets, and the certificate is issued automatically on first connection and renewed without administrator involvement.

Access revocation happens the moment a user is removed from a group in the directory — the window during which a terminated employee could still connect shrank from a day to minutes.

What changed in numbers

Metric Before After
Issuing access for an employee 15–20 minutes manually automatically on login
Access revocation up to 24 hours minutes
Drops when switching networks regular isolated
Administrator workload constant requests exceptions only

We separately addressed connection stability: we configured reconnection when switching networks and correct operation over unstable channels.

The share of sessions that recovered without manual reconnection grew to 98%, and the number of VPN support requests dropped by roughly four times.

How does access via OpenVPN differ from other solutions?

OpenVPN is not "yet another VPN," but a transport layer that integrates into an existing infrastructure: authentication goes through your directory, permissions are granted by group policies rather than individual files for each employee.

That is precisely why a comparison with alternatives should correctly be made not by handshake speed, but by manageability, compatibility, and administration cost.

Manageability manifests at the moment of change. If an employee is terminated or transferred to another department, access is revoked with a single operation in the directory — there is no need to go around dozens of machines and reissue configurations manually.

In solutions where accounts live inside the service itself, access revocation turns into a separate procedure, and the desynchronization between the directory and the VPN accumulates unnoticed and surfaces at the first access review.

Compatibility with the existing infrastructure is the second criterion. OpenVPN operates over standard network ports, so it does not require rebuilding routing and does not conflict with a corporate proxy.

It comes up equally well on servers, in virtual environments, and at the office perimeter, while client profiles are deployed on all major desktop and mobile platforms without a separate gateway for each.

Administration boils down to a predictable set of entities: a certificate authority, server and client certificates, revocation lists, configurations, and routing rules. They can be versioned and reproduced, rather than kept in one engineer's head.

With cloud services, access is simpler at the start, but as the number of sites and requirements for permission separation grow, you either hit tariff limits or begin assembling a hybrid scheme — and then manageability returns to the same question: where the source of truth for access lives.

Bottom line: OpenVPN wins where control over authentication, access revocation, and routing is needed, rather than simply "a connection from point A to point B."

Common technical concerns when deploying a VPN

Compatibility with an existing directory usually raises the most questions: most companies already have a domain or LDAP directory, and no one wants to duplicate accounts.

We connect authentication to the current directory via the LDAP module — users log in with the same credentials, and directory groups directly determine who has access to the VPN.

At the same time, certificates are issued separately for each user or device, so compromising one key does not open access to the others.

What happens if an employee leaves or loses a laptop?

The certificate is revoked via CRL — the revocation list is published on the server and checked on every connection. A revoked key stops working within the list refresh interval, and re-entry with it is impossible, even if the certificate file remained with the former employee.

Additionally, we block the account in the directory — access is closed immediately across both perimeters.

How does the VPN behave on unstable networks — mobile internet, roaming, weak Wi-Fi?

The connection is established over UDP, and if the provider blocks it, it automatically switches to TCP mode. The client reconnects without re-entering the password, and the session is restored at the same address.

For networks with packet loss, we configure keepalive and timeouts so that short interruptions do not tear down the tunnel.

Will the channel handle the load when the whole company connects to the VPN?

Throughput is limited not by the tunnel itself, but by encryption and the channel to the server. We calculate the load profile in advance — how many simultaneous sessions there are and what traffic goes through the VPN — and select a configuration for peak hours. Encryption is performed in hardware, so throughput remains predictable even under mass connection.

These concerns are resolved at the design stage, not after launch. Describe your infrastructure and directory — we will come back with an estimate and a deployment plan.

Let's discuss your VPN access task

To come back with a realistic estimate and plan, we need to understand your current access picture: who connects and from where, which groups already exist in the directory, how certificates are issued now.

Describe the task in free form — that's enough for an initial review, we'll clarify the details in correspondence.

What's worth clarifying at the start: how many simultaneous connections are expected and whether there are peak windows; whether separate access by department and project is needed; whether access revocation upon termination is required within minutes rather than days; whether access from personal devices is planned or only from corporate ones.

The answers determine the certificate verification scheme and how issuance and revocation fit into the directory.

What to prepare so as not to waste time on approvals:

  • a list of groups and roles that need access, indicating who owns each group;
  • a service account in the directory with read-only rights to groups — we'll use it to verify membership;
  • a list of networks and services to which access is opened, with critical ones marked;
  • logging requirements: what to store and for how long, who has the right to read the logs;
  • the contact of the person who will confirm test connections on the side of your employees;
  • a window when a brief access interruption is acceptable for switching to the new scheme.

Next, we'll cross-check this against your infrastructure, lock in the certificate issuance and revocation scheme, and come back with an estimate and a phased plan.

If some of the data is not yet available — don't block the start: we'll begin with what we have and clarify the rest along the way. Write to us which is more convenient for discussing the task — correspondence or a short call with your engineer.