- Technology stack
- Architecture of the Solution
- Installing and Configuring MULTIDIRECTORY
- Configuring Kerberos in the MULTIDIRECTORY Web Interface
- Configuring DNS in the MULTIDIRECTORY Web Interface
- DHCP Configuration
- Domain Trust Configuration
- Group Policy
- Connecting MULTIFACTOR Self-Service Portal to MULTIDIRECTORY
- User, Group, and Resource Management
- Connecting to MULTIFACTOR
- Access Policies
- LDAP Schema
- LDAP Logging Configuration
- Password Policies
- Role and Permission Configuration
- LDAP Authentication in Ansible AWX
- LDAP Authentication in ArgoCD
- LDAP Authentication in GitLab
- LDAP Authentication in GitFlic
- LDAP Authentication in Jenkins
- LDAP Authentication in Harbor
- LDAP Authentication in Nexus
- LDAP Authentication in PostgreSQL
- LDAP Authentication in Rancher
- LDAP Authentication in Proxmox VE
- LDAP Authentication in SpaceVM
- LDAP Authentication in Tantor
- LDAP Authentication in Shturval
- LDAP Authentication in zVirt
- LDAP Authentication in GLPI
LDAP Authentication Setup Guide for OpenVPN
Overview
This article explains how to configure LDAP authentication in OpenVPN, using MULTIDIRECTORY as the identity provider.
Prerequisites
- A running MULTIDIRECTORY directory service.
- A pre-installed
OpenVPNserver (Access Server or community edition with plugin support).
Preparation
- Create a dedicated service account in
MULTIDIRECTORYwith read-only permissions to the directory.OpenVPNwill use this account to bind and verify user credentials. - Create access groups in
MULTIDIRECTORYforOpenVPNusers
OpenVPN Configuration
Setting Up LDAP Authentication on the OpenVPN Server
Install the openvpn-auth-ldap package:
apt install openvpn-auth-ldap
After installing the package, open the OpenVPN server configuration file /etc/openvpn/server.conf:
nano /etc/openvpn/server.conf
Add the following two lines to the server.conf file:
... username-as-common-name plugin /usr/lib/openvpn/openvpn-auth-ldap.so /etc/openvpn/auth/ldap.conf
Create the directory /etc/openvpn/auth:
mkdir /etc/openvpn/auth
Open the LDAP configuration file for editing nano /etc/openvpn/auth, then fill it in according to the example below:
<LDAP> URL ldaps://your.domain.ru BindDN CN=openvpn.user,CN=Users,DC=your,DC=domain,DC=ru Password YourPassword Timeout 15 TLSEnable no </LDAP> <Authorization> BaseDN "DC=your,DC=domain,DC=ru" SearchFilter "(&(sAMAccountName=%u)(memberOf=CN=openvpn users,OU=Users,DC=your,DC=domain,DC=ru))" </Authorization>
Field Descriptions
- URL — specifies the address and port of your
MULTIDIRECTORYserver. Both LDAP and LDAPS protocols are supported- BindDN — the Distinguished Name (DN) of the service account with read access to the directory
- Password — the password for the service account specified in BindDN.
- BaseDN — the base Distinguished Name (DN) where user accounts are located (e.g., dc=example,dc=com). This is the starting point for user searches during authentication.
- SearchFilter — an LDAP search filter that restricts authentication to members of specific security groups
After saving the configuration file, restart the OpenVPN service to apply the changes
service openvpn restart
Client Configuration
As an administrator, launch any text editor (e.g., Notepad) and open the OpenVPN client configuration file. By default, it is located at: C:\Program Files\OpenVPN\config\openvpnconfig.ovpn
Add the following line to the configuration file:
auth-user-pass
Save the changes to the .ovpn file and test the connection.
When initiating a connection to OpenVPN, a login prompt will appear, requesting the user’s username and password from MULTIDIRECTORY.
