Created on
‎09-23-2024
02:03 AM
Edited on
‎09-16-2025
11:31 PM
By
Jean-Philippe_P
Description | This article demonstrates how to set up FortiClient IPsec VPN access with LDAP as the authentication method. The IPsec phase1 settings also selected for this example are IKE version 1, which is created with the IPsec VPN Wizard as the default IKE version for Remote Access. |
Scope | FortiGate. |
Solution |
LDAP and user group configuration:
After configuration of the LDAP server, use the IPsec Wizard for the VPN Creation:
Testing using the FortiClient machine:
diagnose vpn ike gate list
The following command can also be used to filter the output: diagnose vpn ike gate list | grep "name:\|xauth-user"
The user will only be listed in the Firewall Users or 'diagnose firewall auth list' when the user group is configured on the Firewall Policy. This is done by setting 'Inherit from policy' on the IPSEC VPN phase1 settings.
This is the recommended configuration when there are multiple user groups involved. More information about the configuration can be seen in this KB article: Technical Tip: Using group based firewall policy for Dial-Up VPN to restrict network access.
The user group must be either configured inside the IPsec Phase 1 settings or in the firewall policy. If the group is configured in both IPsec Phase 1 and firewall policy, the traffic stops flowing through the IPsec tunnel.
Run the following commands:
diagnose debug reset diagnose debug application ike -1 diagnose debug application fnbamd -1 diagnose debug enable
The FortiGate will search the Distinguished Name of the LDAP Server for the Common Name of 'cn=vpnuser1', since 'cn' is the configured Common Name Identifier under the LDAP Server settings.
2831] fnbamd_ldap_result-Result for ldap svr 10.149.0.2(LDAP-SVR) is SUCCESS
It is possible to change the Common Name Identifier, depending on the configuration preference and requirement.
Note: LDAP-based user authentication is designed to work with XAUTH and IPsec IKEv1.
Related articles: Technical Tip: How to configure IPsec remote access with full tunnelling Technical Tip: Differences between Aggressive and Main mode in IPSec VPN configurations Troubleshooting Tip: IPsec VPN Phase 1 Process - Aggressive Mode Technical Tip: Username format for LDAP authentication Technical Tip: IKEv2 tunnel fails when LDAP based usergroup is used for EAP |
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.