Freeradius 3找不到pfSense OpenVPN Auth-Requests的Auth-Type

我已经使用NTLM-Auth针对Samba 4.5.8 AD域控制器成功设置了Freeradius 3.0.12。 Radtest对每个用户都有正确的密码。 当我尝试对Freeradius服务器上的pfSense上的OpenVPN用户进行身份validation时,它努力为用户find正确的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 = "[email protected]" (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 = "[email protected]" (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: --> [email protected] (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服务器configuration如下: http : //deployingradius.com/documents/configuration/active_directory.html

我读了设置默认身份validationtypes是一个坏主意,因为它会打破任何其他forms的身份validation。 我想使用服务器进行WiFi身份validation,所以我至less需要PEAP-MSCHAPv2才能正常工作。

在上面的例子中,你正在做PAP而不是PEAP。 没有模块会自动将ntlm_auth设置为authtypes,因此您需要使用策略语言

 authorize { if (&User-Password) { update control { Auth-Type := ntlm_auth } } eap }