Description |
This article describes the behavior for queries from FortiGate to remote LDAP servers when ha-direct is enabled. |
Scope | FortiGate v6.4 and above. |
Solution |
When HA-direct is enabled, FortiGate sends LDAP queries using the reserved management interface. See FortiOS Administration Guide: Out-of-band management
This applies to actual user authentication traffic as well as manually triggered credential checks using the CLI command 'diagnose test authserver'.
The ha-direct setting does not apply for connectivity or credential checks using the GUI. These requests are set in-band rather than using the reserved management interface.
GUI LDAP connectivity test: In this example deployment, while testing from the GUI, the LDAP server appears inaccessible.
Testing the LDAP server from the GUI is treated as in-band traffic. The in-band interface for the LDAP server IP address '10.250.0.21' is the IPsec tunnel 'PRIVATE-CLOUD'. This is determined by a conventional routing table lookup.
FGT-A (root) # get router info routing-table details 10.250.0.21 Routing table for VRF=0
Because the remote side of the tunnel is not configured to allow the FortiGate to send traffic to 10.250.0.21 over this route, there is no response from the remote side during the connectivity check.
FGT-A (root) # diagnose sniffer packet any 'port 389' 4 1000
CLI LDAP credential check: The FortiGate has the following sample configuration, including 'ha-mgmt-status enable' and 'ha-direct enable':
config system ha set group-id 134 edit 1 set interface "wan2" next end set override disable end
With this configuration, FortiGate uses the reserved management interface 'wan2' to send authentication attempts to the LDAP server.
This can be checked with the 'diagnose test authserver' command as follows:
diagnose test authserver ldap "<LDAP server name>" user password
FGT-A (root) # diagnose test authserver ldap "LDAP" ldap-user ldap-password FGT-A (root) #
A simultaneous packet sniffer shows the port 389 LDAP traffic exiting out the reserved HA management interface, wan2, as intended.
FGT-A (root) # diagnose sniffer packet any 'port 389' 4 1000
Note: If the LDAP server is remote from FortiGate's perspective and must be accessed over a non-physical interface (for example, an IPsec tunnel), ha-direct must be disabled in 'config system ha'. Since changing HA-direct can affect management access to the firewall as well as user traffic, depending on which features are in use, it is recommended to make any changes during a maintenance window and to have local access to the HA cluster during this time. |
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.