Description | This article describes how to properly set up and troubleshoot a dial-up VPN with LDAP authentication on Active Directory and User Certificates provisioned by the Active Directory Certificate Authority server to endpoints. This can only be implemented in v7.4.4+. Any version before that does not perform UserName cross-matching with the certificate information. |
Scope | FortiGate, FortiClient, and Active Directory. |
Solution |
Process Flow:
Configuration: FortiClient configuration: Enable EAP. Authentication Method X.509 Certificate.
Client Certificate example:
FortiGate configuration:
First, an LDAP object pointing to the Active Directory needs to be configured:
config user ldap set account-key-cert-field othername vaEwUdVpjBhwgnwBgT/+H3iuZyHQifgM1HgWT/j9Ods8cWUxiv2OdioMHkQNwV4lojAYtFlmMjY3dkVA
And a CA certificate from Active Directory imported as a remote CA. This CA certificate is used to create a peer user:
config user peer edit "IKEv2_peer" end
With this peer setting, FortiGate will make an LDAP searchRequest for the userPricipalName of the certificate. If the LDAP server does not reply with an entry, the authentication fails. The password itself is not validated here.
A Certificate Signing Request(CSR) for the FortiGate public IP or URL, which is then going to be signed by the Microsoft CA server, is a good idea. A Let's Encrypt certificate or any other certificate signed by a third-party CA can be used; the only limitation is that it needs to protect the FortiGate public IP or URL
Lastly, this is what the IPsec phase1 configuration should look like:
config vpn ipsec phase1-interface
Important: eap-cert-auth is needed in order for FortiGate to send the EAP challenge after certificate verification. This is a FortiNet proprietary implementation. It works only with FortiClient.
Note: cert-peer-username-validation othername is needed to cross validate the certificate UserPricipalName with the provided username. cert-peer-username-strip when enabled allows for the username to be provided without the UserPricipalName or sAMAccountName syntax (Like this 'User', not like this 'User@homelab.local').
Related documents: LDAP-integrated certificate authentication: Using the SAN field for LDAP-integrated certificate authentication
EAP and certificate authentication: IPsec IKEv2 VPN 2FA with EAP and certificate authentication
Cross-validation: |
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2025 Fortinet, Inc. All Rights Reserved.