freeradius - 在 ubuntu 18 中制作 freeradius 3 查看客户端“秘密”的 mysql nas 表
问题描述
我正在从运行“radtest”的同一台计算机上运行 freeradius。
我可以从“users”文件或 mysql 中获取用户密码的“accept”消息,并且可以从 clients.conf 文件中获取客户端“secret”,但无法弄清楚如何让 freeradius 查看 mysql客户的“秘密”。
我是否必须以某种方式禁用或覆盖“cients.conf”中的条目?
以下是文件条目、mysql和测试结果的摘要:
/etc/freeradius/3.0/clients.conf #client localhost with secret testing123
/etc/freeradius/3.0/users #testing Cleartext-Password := "testpwd"
/etc/freeradius/3.0/mods-available/sql #read_clients = yes (/etc/freeradius/3.0/sites- enabled/sql points here)
SELECT * FROM radgroupreply LIMIT 10;
| id | groupname | attribute | op | value |
| 1 | dynamic | Framed-Compression | := | Van-Jacobsen-TCP-IP |
| 2 | dynamic | Framed-Protocol | := | PPP |
| 3 | dynamic | Service-Type | := | Framed-User |
| 4 | dynamic | Framed-MTU | := | 1500 |
| 5 | 2048-1024 | Motorola-Canopy-ULBR | = | 1024 |
| 6 | 2048-1024 | Motorola-Canopy-ULBL | = | 500000 |
mysql> SELECT * FROM radusergroup LIMIT 10;
| username | groupname | priority |
| fredf | dnamic | 2 |
| 0a-00-3e-89-35-32 | 2048-1024 | 2 |
mysql> SELECT * FROM radcheck LIMIT 10;
| id | username | attribute | op | value |
| 3 | fredf | Cleartext-Password | := | wilma |
| 6 | 0a-00-3e-89-35-32 | Cleartext-Password | := | passwordsql |
mysql> SELECT * FROM radreply LIMIT 10;
| id | username | attribute | op | value |
| 1 | fredf | Motorola-Canopy-UserLevel | = | 3 |
| 2 | testuser | Motorola-Canopy-UserLevel | = | 3 |
mysql> SELECT * FROM nas LIMIT 10;
| id | nasname | shortname | type | ports | secret | server | community | description |
| 1 | 10.10.2.2 | Griz450NW | 1 | 1812 | naspass | localhost | ISReader | Griz450NW |
radtest testing testpwd 127.0.0.1 0 testing123 #works
Received Access-Accept Id 107 from 127.0.0.1:1812 to 0.0.0.0:0 length 20
radtest fredf wilma 127.0.0.1 0 testing123 #works
Received Access-Accept Id 242 from 127.0.0.1:1812 to 0.0.0.0:0 length 32
Motorola-WiMAX-Home-BTS = 0x00000003
radtest 0a-00-3e-89-35-32 passwordsql 127.0.0.1 0 testing123 #works
Received Access-Accept Id 27 from 127.0.0.1:1812 to 0.0.0.0:0 length 44
Motorola-Canopy-ULBR = 1024
Motorola-Canopy-ULBL = 500000
radtest 0a-00-3e-89-35-32 passwordsql 127.0.0.1 0 naspass #doesn't work
Radius -X output: Dropping packet without response because of error: Received packet from 127.0.0.1 with invalid Message-Authenticator! (Shared secret is incorrect.)
解决方案
一旦我将“nasname”更改为“127.0.0.1”并在clients.conf中禁用客户端(我只是将“ipaddr”从“127.0.0.1”更改为“127.0.0.2”),NAS 表条目就起作用了。
推荐阅读
- javascript - 如何使引导程序崩溃平滑
- python - 如果不调用函数是否可以引发异常
- ionic-framework - 将 Bootstrap 与 Stenciljs 一起使用
- nearprotocol - NFT 有价转账
- r - 如何删除R中的列?
- android - 如果可以的话,使用更具体的更改事件总是更有效。依靠 notifyDataSetChanged 作为最后的手段。回收视图
- swift - 如何在 Swift 中对 Int 类型的字符串格式的数组进行排序
- reactjs - axios post请求中的setState挂钩不起作用
- c++ - cin.ignore() 如果有字符
- assembly - 创建一个“显示” ax 中的位的循环。“显示”一词意味着将这些位放入另一个寄存器。另一个寄存器中的值为 0 或 1