Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    pfSense 2.4.4 LDAP авторизация в Active Directory

    Scheduled Pinned Locked Moved Russian
    ldapdomainauthentication
    3 Posts 2 Posters 3.8k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • jMurrJ
      jMurr
      last edited by jMurr

      Решил настроить авторизацию в Active Directory по LDAP.
      В System - User Manager - Authentication Servers настроил сервер. По ЭТОЙ инструкции с такими параметрами:

      Descriptive name:	AD-adminsgroup
      Type:			LDAP
      Hostname or IP address:	x.x.x.61
      Port value:		389
      Transport:		TCP – Standard
      Peer Certificate Authority: самодписанный сертификат CA PfSense
      Protocol version:	3
      Server Timeout:		25
      Search Scrope:		Entire Subtree
      Base DN:		DC=pentegy-ua,DC=local
      Authentication containers: OU=Pentegy-UA,DC=pentegy-ua,DC=local
      Extended query:		Enabled
      Query:			"(&(objectClass=person)(memberOf:1.2.840.113556.1.4.1941:=CN=pfSense,OU=Groups,OU=Pentegy-UA,DC=pentegy-ua,DC=local))"
      Bind anonymous:		Unchecked
      Bind credentials:	A**c@pentegy-ua.local
      User naming attribute:	sAMAccountName
      Group naming attribute:	cn
      Group member attribute 	memberOf
      LDAP Server uses RFC 2307 style group membership: Unchecked
      Group Object Class:	posixGroup
      UTF8 encode LDAP parameters before sending them to the server: Unchecked
      Do not strip away parts of the username after the @ symbol: Unchecked
      

      При нажатии на кнопку "Select a container" выводит список доступных контейнеров.
      Так же проверил в shell, зайдя через SSH:

      /root: ldapsearch -LLL -x -D a**c@pentegy-ua.local -w p@ssword -h x.x.x.61 -s sub -b "OU=Pentegy-UA,DC=pentegy-ua,DC=local" sAMAccountName=a**y "(&(objectClass=person)(memberOf:1.2.840.113556.1.4.1941:=CN=pfSense,OU=Groups,OU=Pentegy-UA,DC=pentegy-ua,DC=local))"
      dn: CN=A***** ************y,OU=DAdmin,OU=Users,OU=Pentegy-UA,DC=pentegy-ua,DC=local
      

      В логах только такое сообщение об ошибке после попытки логина:

      php-fpm[73496]: /index.php: webConfigurator authentication error for user 'a**y' from: x.x.x.12
      

      Пробовал в разделе System - User Manager - Settings - Authentication Server выставлять не Local Database, а созданный AD-adminsgroup - не помогает...
      Куда копать, что думать? Идеи уже иссякли.

      P.S.: 2.4.4-RELEASE-p2 (amd64)

      jMurrJ 1 Reply Last reply Reply Quote 0
      • jMurrJ
        jMurr @jMurr
        last edited by

        В общем разобрался я более-менее.
        Это явная бага pfSense.
        Если в фильтре указываешь ссылку на группу да ещё с учётом вхождения в другие группы - то он не отрабатывает...
        А если без фильтра и просто на OU - чудесно получается пройти авторизацию.
        Собираюсь openVPN настраивать, если и там такая ерунда, то это вообще печально будет!!!

        K 1 Reply Last reply Reply Quote 0
        • K
          Konstanti @jMurr
          last edited by

          @jmurr
          Посмотрите тут
          Обратите внимание на раздел Extended Query
          Возможно , это то что Вам нужно
          https://docs.netgate.com/pfsense/en/latest/usermanager/ldap-troubleshooting.html

          1 Reply Last reply Reply Quote 0
          • First post
            Last post
          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.