FreeRadius使用两个Auth-Type PAP和EAP
问题描述:
我使用了freeradius服务器,它使用MySQL来存储数据。FreeRadius使用两个Auth-Type PAP和EAP
以下是我的数据库
radcheck table
+-----+----------+--------------------+----+--------------+
| id | username | attribute | op | value |
+-----+----------+--------------------+----+--------------+
| 474 | varun | Cleartext-Password | := | sunshine3003 |
+-----+----------+--------------------+----+--------------+
radreply table
+----+----------+--------------+----+-------+
| id | username | attribute | op | value |
+----+----------+--------------+----+-------+
| 1 | varun | Fall-Through | = | Yes |
+----+----------+--------------+----+-------+
radgroupcheck table
+----+-----------+-----------+----+-------+
| id | groupname | attribute | op | value |
+----+-----------+-----------+----+-------+
| 1 | group1 | Auth-Type | := | PAP |
| 2 | eapgroup | Auth-Type | := | EAP |
+----+-----------+-----------+----+-------+
radusergroup table
+----------+-----------+----------+
| username | groupname | priority |
+----------+-----------+----------+
| varun | eapgroup | 1 |
| varun | group1 | 2 |
+----------+-----------+----------+
我们的系统使用两种不同的身份验证类型有免费半径两个不同的客户端,一个使用PAP
和User-Password
属性发送密码。
和其他客户端用户EAP
,并将在EAP-Message
密码和Message-Authenticator
我要的是,当PAP身份验证失败或当User-Password
属性不存在,它应该使用EAP
作为Auth-Type
如果EAP
和Message-Authenticator
是不存在于radius属性中,它应该用Access-reject或Authentication失败消息来回复。
任何帮助将不胜感激
答
你不应该手动设置control:Auth-Type
。此属性存在,因此authorize
部分中的模块可与服务器的其余部分进行通信,即应在authenticate
部分中运行的身份验证类型。
为了设置基于属性Auth-Type
你应该列出PAP,EAP等..又在授权部分模块,他们会检查,如果必要的属性是在请求和确定正确的验证型值。
如果您想制定一个策略来限制某些用户进行某些类型的验证,请在回复列表(radgroupreply表)中设置Auth-Type,并检查在授权部分末尾设置了哪个Auth-Type 。
authorize {
eap
pap
sql
if (control:Auth-Type != reply:Auth-Type) {
reject
}
}