Description.
This article describes how to configure LDAP services on the FortiAuthenticator and shows how to integrate with a FortiGate.
This includes the FortiAuthenticator as well as the FortiGate configuration.
Scope.
FortiGate.
FortiAuthenticator.
Solution
Diagram.
Internet <----> FortiGate <----> FortiAuthenticator <---->(LAN)
FortiAuthenticator Configuration.
- Enable LDAP services on the interface connected to the FortiGate.
- Go to Network -> Interfaces -> Access Rights -> Services, select check box for LDAP (TCP/389).
![25.png 25.png](/t5/image/serverpage/image-id/59637iDB46FC8BDDD633C6/image-size/large/is-moderation-mode/true?v=v2&px=999)
- Create Groups.
- LDAP Administrator Group.
Go to Authentication -> User Management -> User Groups -> Create New, create new group named: ‘ldap_admins’.
![26.png 26.png](/t5/image/serverpage/image-id/59638iC972A0BB9FC39D99/image-dimensions/701x483/is-moderation-mode/true?v=v2)
Go to Authentication -> User Management -> User Groups -> Create New, create new group named: ‘testgrp’.
![27.png 27.png](/t5/image/serverpage/image-id/59639iA41DB46D1BFDD0E3/image-dimensions/699x475/is-moderation-mode/true?v=v2)
- Create users and add them under the respective groups created earlier.
Go to Authentication -> User Management -> Local Users -> Create New.
ldapadmin -> to the group ldap_admins.
Add rights to the 'ldapadmin' user for LDAP browsing.
![28.png 28.png](/t5/image/serverpage/image-id/59640i2B244DA7AAEAD9C5/image-dimensions/702x516/is-moderation-mode/true?v=v2)
test1 -> to the group testgrp.
![29.png 29.png](/t5/image/serverpage/image-id/59641iCD92B9FF9A81A2BC/image-dimensions/701x527/is-moderation-mode/true?v=v2)
After configurations done:
![30.png 30.png](/t5/image/serverpage/image-id/59642i6B80F5B8F199CADC/image-dimensions/701x87/is-moderation-mode/true?v=v2)
![31.png 31.png](/t5/image/serverpage/image-id/59643iFF14810A04DC632B/image-dimensions/698x116/is-moderation-mode/true?v=v2)
- Configure Directory Tree as shown below. Ensure that the LDAP Administrator is a part of LDAP tree. The LDAP admin and the users MUST be contained as object below the 'Distinguished name' (= baseDN) configuration on FortiGate. If the Admin or user are outside of the baseDN, the objects won't be found.
Go to Authentication -> LDAP Service -> Directory Tree.
FortiGate Configuration.
- Go to User & Authentication -> LDAP Servers -> Create New.
Complete using:
FortiAuthenticator Interface IP: Server IP/Name.
FortiAuthenticator LDAP Interface Service Port, default 389.
Distinguished Name. Same name used in FortiAuthenticator LDAP Service -> Directory Tree.
Username and Password.
- Test Authentication from FortiGate CLI, with the command syntax as follows:
diagnose test authserver ldap <name of LDAP server configuration> <username> <password>
Example:
diagnose test authserver ldap LDAP ldapadmin admin$123
Go to Logging -> Log Access -> Logs, select 'ldapadmin' authentication log:
- Create User Group.
Go to User & Device -> User -> User Groups, enter 'Name' and select 'Create New' under 'Remote groups', select the remote server created and select the required user group name.
- User group created on firewall in the last step can now be selected on the appropriate firewall authentication policy.
Related articles: