FortiGate
FortiGate Next Generation Firewall utilizes purpose-built security processors and threat intelligence security services from FortiGuard labs to deliver top-rated protection and high performance, including encrypted traffic.
shahv
Staff
Staff
Article Id 196141

Description


This article describes the steps to configure the LDAP server in FortiGate and how to map LDAP users/groups to Firewall policies.

End users can then see a firewall popup on the browser that will ask for authentication prior to using the service.

 

Note that such a policy will also not allow DNS queries if the user is not authenticated.

End users must have some way of resolving the destination address that would match this policy.

If DNS does not work, the users will not be able to authenticate as the HTTP connection to the destination cannot be made.

 

Scope


FortiGate.


Solution


To configure the FortiGate unit for LDAP authentication – Using GUI:

 

  1. Go to User & Device -> Authentication -> LDAP Servers and select Create New.

 

For new Firmware 7.0 & above the path would be:

 

  1. Go to User & Authentication -> LDAP Servers and select Create New.

  2. Enter a Name for the LDAP server.

  3. In Server Name/IP enter the server’s FQDN or IP address.

  4. If necessary, change the Server Port number. The default is port 389.

  5. Enter the Common Name Identifier (20 characters maximum).

      cn is the default, and most of the customers will be using sAMAccountName.

 

  • CN stands for Common Name which is an attribute name in LDAP.
  • sAMAccountName is another LDAP attribute and can reference the login name (in reference to Windows LDAP server).

Make sure to get the info on which attributes the end users are using against the LDAP server as the values of the attributes can look different, for example, 'usert' vs. 'TestUser'.

  1. For a Distinguished name, select browse and select the main domain (Select the domain once the Username and Password are entered as per steps 8 and 9).

     

  2. In Bind Type, select Regular.

     

  3. In the Username field, enter the LDAP administrator's account name along with the domain (Ref. Screenshot below). In some cases, the domain\username format may not work. Use the distinguishedName from the domain controller.

    Copy the distinguishedName value from the Windows Domain Controller by opening Active Directory Users and Computers, then selecting the View menu and Advanced Features. After, locate and right-click the desired credentials and select Properties. Next, click the Attribute Editor tab and copy the value of distinguishedName.

     

  4. In the Password field, enter the LDAP administrator's account password.

     

  5. Select OK.

     

    ldap.png

     

     
To import users from the LDAP directory, follow the below steps – GUI:
 
  1. Go to User & Devices -> User Definition -> Create New.
 

For new Firmware 7.0 & above the path would be:

 

  1. Go to User & Authentication ->  User Definition and select Create New.

  2. On 'User Type', choose 'Remote LDAP user' and select 'Next'.

  3. On 'LDAP Server', select the LDAP server name and select 'Next'.

  4. Select the User. 'Right-click', select + Add Selected and select 'Submit'.
 
 
 
 
Once Users/Groups are imported, use them in a firewall policy.

 
Users that have been imported from the LDAP server, can be used to enforce user-based policies as permission sets and allow VPN connections, depending on the usage requirements.
 
Note: LDAP authentication supports HTTP, HTTPS, FTP, and Telnet Protocols only.