Skip to main content
lradmin
New Member
February 18, 2022
Question

Fortigate LDAP Authentication To FreeIPA with Group Filtering

  • February 18, 2022
  • 3 replies
  • 3832 views

Is there a way to restrict LDAP authentication to FreeIPA based on ldap user group membership? Currently configured, as suggested in forum, with

 

set cnid uid
set dn "cn=accounts,dc=<suffix>,dc=<suffix>

 

However this setup allows ANY ldap user to be successfully authenticated. I can't figure out a way to restrict it to only a specific ldap group in FreeIPA. Suspecting it has to do with one of setting either of the config option group-member-check, group-search-base and group-filter.

 

Any help will be greatly appreciated!

3 replies

JackTrades
New Member
February 18, 2022

Hi,

after defining the server you have to import users and groups for the usage in policies.

 

Technical Tip: How to configure LDAP server - Fortinet Community

 

This should fulfill your use cases, because only users/groups listed in your policy can access ressources.

kpante
New Member
June 7, 2025

Hi, I got this to work with the following configuration (User attribute checking):

 

config user ldap
edit "ipa"
set server <SERVER>
set cnid "uid"
set dn "cn=accounts,dc=example,dc=com"
set type regular
set username "uid=<BIND-USER>,cn=users,cn=accounts,dc=example,dc=com"
set password <PASSWORD>
set group-search-base "cn=groups,cn=accounts,dc=example,dc=com"
set group-filter "(&(objectClass=groupofnames)(member=%u))"
set secure ldaps
set port 636
next
end

config user group
edit "remote_administrators"
set member "ipa"
config match
edit 1
set server-name "ipa"
set group-name "cn=<GROUP>,cn=groups,cn=accounts,dc=example,dc=com"
next
end
next
end

You have to specify 'cn=accounts' in the Base DN otherwise 'cn=compat' will be used.

Keep in mind that when you use LDAPS the certificate has to be trusted.

iffster
New Member
February 11, 2026

Thank you very much! That "compat" thing ate so much time.

Thought Leadership Security Summit. Outpace New Threats with AI - enhanced defense. Tuesday, Septmeber 15, 8:30 AM - 2:30 PM PT. The Golf Club at Newcastle, WA.
Virtual event | September 2026. SASE summit. The age of autonomous trust. Register here!