Freeradius 3 не может найти Auth-Type для pfSense OpenVPN Auth-Requests

Я успешно настроил Freeradius 3.0.12 с NTLM-Auth для контроллера домена Samba 4.5.8 AD. Radtest отлично работает с любым пользователем и правильным паролем. Когда я пытаюсь аутентифицировать пользователей OpenVPN в pfSense на сервере Freeradius, он изо всех сил пытается найти правильный Auth-Type для пользователя. Freeradius -X дает следующие результаты:

(8) Received Access-Request Id 186 from 10.100.0.254:25983 to 10.100.0.32:1812 length 115
(8)   NAS-IP-Address = 192.168.1.25
(8)   NAS-Identifier = "openVPN"
(8)   NAS-Port-Type = Virtual
(8)   NAS-Port = 1194
(8)   Called-Station-Id = "192.168.1.25:1194"
(8)   User-Name = "user@samdom.example.com"
(8)   User-Password = "XXXXXX"
(8) # Executing section authorize from file /etc/freeradius/3.0/sites-enabled/default
(8)   authorize {
(8)     policy filter_username {
(8)       if (&User-Name) {
(8)       if (&User-Name)  -> TRUE
(8)       if (&User-Name)  {
(8)         if (&User-Name =~ / /) {
(8)         if (&User-Name =~ / /)  -> FALSE
(8)         if (&User-Name =~ /@[^@]*@/ ) {
(8)         if (&User-Name =~ /@[^@]*@/ )  -> FALSE
(8)         if (&User-Name =~ /\.\./ ) {
(8)         if (&User-Name =~ /\.\./ )  -> FALSE
(8)         if ((&User-Name =~ /@/) && (&User-Name !~ /@(.+)\.(.+)$/))  {
(8)         if ((&User-Name =~ /@/) && (&User-Name !~ /@(.+)\.(.+)$/))   -> FALSE
(8)         if (&User-Name =~ /\.$/)  {
(8)         if (&User-Name =~ /\.$/)   -> FALSE
(8)         if (&User-Name =~ /@\./)  {
(8)         if (&User-Name =~ /@\./)   -> FALSE
(8)       } # if (&User-Name)  = notfound
(8)     } # policy filter_username = notfound
(8)     [preprocess] = ok
(8)     [chap] = noop
(8)     [mschap] = noop
(8)     [digest] = noop
(8) suffix: Checking for suffix after "@"
(8) suffix: Looking up realm "samdom.example.com" for User-Name = "user@samdom.example.com"
(8) suffix: No such realm "samdom.example.com"
(8)     [suffix] = noop
(8) eap: No EAP-Message, not doing EAP
(8)     [eap] = noop
(8)     [files] = noop
(8)     [expiration] = noop
(8)     [logintime] = noop
(8) pap: WARNING: No "known good" password found for the user.  Not setting Auth-Type
(8) pap: WARNING: Authentication will fail unless a "known good" password is available
(8)     [pap] = noop
(8)   } # authorize = ok
(8) ERROR: No Auth-Type found: rejecting the user via Post-Auth-Type = Reject
(8) Failed to authenticate the user
(8) Using Post-Auth-Type Reject
(8) # Executing group from file /etc/freeradius/3.0/sites-enabled/default
(8)   Post-Auth-Type REJECT {
(8) attr_filter.access_reject: EXPAND %{User-Name}
(8) attr_filter.access_reject:    --> user@samdom.example.com
(8) attr_filter.access_reject: Matched entry DEFAULT at line 11
(8)     [attr_filter.access_reject] = updated
(8)     [eap] = noop
(8)     policy remove_reply_message_if_eap {
(8)       if (&reply:EAP-Message && &reply:Reply-Message) {
(8)       if (&reply:EAP-Message && &reply:Reply-Message)  -> FALSE
(8)       else {
(8)         [noop] = noop
(8)       } # else = noop
(8)     } # policy remove_reply_message_if_eap = noop
(8)   } # Post-Auth-Type REJECT = updated
(8) Delaying response for 1.000000 seconds

Я пробовал использовать и без области в имени пользователя, полученные журналы не изменились. Сервер freeradius настроен, как описано здесь: http://deployingradius.com/documents/configuration/active_directory.html

Я читал, что установка Auth-Type по умолчанию - плохая идея, потому что это нарушит любой другой формы аутентификации. Я также хочу использовать сервер для аутентификации WiFi, поэтому для работы мне нужен хотя бы PEAP-MSCHAPv2.

0
задан 27 September 2017 в 12:14
1 ответ

В приведенном выше примере вы выполняете PAP, а не PEAP. Нет модуля, который автоматически установил бы ntlm_auth в качестве типа аутентификации, поэтому вам нужно сделать это на языке политики, т.е.

authorize {
    if (&User-Password) {
        update control {
            Auth-Type := ntlm_auth
        }
    }
    eap
}
1
ответ дан 4 December 2019 в 16:07

Теги

Похожие вопросы