我已经在 Centos 上安装了 freeradius。
MySQL 数据库中填充了一些用于测试的数据,并且配置了 freeradiusd.conf 和 sql.conf。
RADIUS 服务器能够连接 MySQL 数据库,我可以从中验证用户身份。我还配置了一个远程 RADIUS 客户端,该客户端与我的强制门户和 RADIUS 服务器配合使用,但是,只有当我在 中配置了客户端的 IP 地址时,它才有效/etc/raddb/clients.conf
。使用 MySQL“nas”表时,它不起作用。
换句话说,freeradius 似乎没有从 MySQL 数据库查询我的 nas 表。
在我的/etc/raddb/mods-enabled/sql
文件中,有以下内容:
# Table to keep radius client info
nas_table = "nas"
# Set to 'yes' to read radius clients from the database ('nas' table)
read_clients = yes
在我的 nas 表中,我有以下内容:
id nasname shortname type ports secret server community description
1 xx.xx.xx.xx NULL other NULL testing123
default NULL RADIUS Client
...其中 xx.xx.xx.xx 是我的 RADIUS 客户端的正确 IP 地址。
当我尝试通过强制门户登录时,使用 freeradius 在调试模式下运行,我收到以下信息:
Wed Aug 8 06:39:11 2018 : Info: Ready to process requests
Wed Aug 8 06:39:19 2018 : Error: Ignoring request to auth address * port 1812 bound to server default from unknown client xx.xx.xx.xx port 55546 proto udp
Wed Aug 8 06:39:19 2018 : Info: Ready to process requests
Wed Aug 8 06:39:21 2018 : Error: Ignoring request to auth address * port 1812 bound to server default from unknown client xx.xx.xx.xx port 55546 proto udp
Wed Aug 8 06:39:21 2018 : Info: Ready to process requests
Wed Aug 8 06:39:24 2018 : Error: Ignoring request to auth address * port 1812 bound to server default from unknown client xx.xx.xx.xx port 55546 proto udp
Wed Aug 8 06:39:24 2018 : Info: Ready to process requests
eWed Aug 8 06:39:28 2018 : Error: Ignoring request to auth address * port 1812 bound to server default from unknown client xx.xx.xx.xx port 55546 proto udp
我在调试输出中注意到 nas 中的数据正在被加载
Wed Aug 8 09:07:58 2018 : Debug: rlm_sql (sql): Reserved connection (0)
Wed Aug 8 09:07:58 2018 : Debug: rlm_sql (sql): Executing select query: SELECT id, nasname, shortname, type, secret, server FROM nas
Wed Aug 8 09:07:58 2018 : Debug: rlm_sql (sql): Adding client xx.xx.xx.xx (xx.xx.xx.xx) to default clients list
Wed Aug 8 09:07:58 2018 : Debug: Adding client xx.xx.xx.xx/32 (xx.xx.xx.xx) to prefix tree 32
Wed Aug 8 09:07:58 2018 : Debug: rlm_sql (xx.xx.xx.xx): Client "xx.xx.xx.xx" (sql) added
Wed Aug 8 09:07:58 2018 : Debug: rlm_sql (sql): Released connection (0)
Wed Aug 8 09:07:58 2018 : Debug: # Instantiating module "pap" from file /etc/raddb/mods-enabled/pap
Wed Aug 8 09:07:58 2018 : Debug: # Instantiating module "reject" from file /etc/raddb/mods-enabled/always
Wed Aug 8 09:07:58 2018 : Debug: # Instantiating module "fail" from file /etc/raddb/mods-enabled/always
Wed Aug 8 09:07:58 2018 : Debug: # Instantiating module "ok" from file /etc/raddb/mods-enabled/always
Wed Aug 8 09:07:58 2018 : Debug: # Instantiating module "handled" from file /etc/raddb/mods-enabled/always
Wed Aug 8 09:07:58 2018 : Debug: # Instantiating module "invalid" from file /etc/raddb/mods-enabled/always
Wed Aug 8 09:07:58 2018 : Debug: # Instantiating module "userlock" from file /etc/raddb/mods-enabled/always
Wed Aug 8 09:07:58 2018 : Debug: # Instantiating module "notfound" from file /etc/raddb/mods-enabled/always
Wed Aug 8 09:07:58 2018 : Debug: # Instantiating module "noop" from file /etc/raddb/mods-enabled/always
Wed Aug 8 09:07:58 2018 : Debug: # Instantiating module "updated" from file /etc/raddb/mods-enabled/always
Wed Aug 8 09:07:58 2018 : Debug: # Instantiating module "monthlycounter" from file /etc/raddb/mods-enabled/sqlcounter
任何帮助都将不胜感激!PS:我尝试将 nas 表中的短名称更改为与 ip 相同的名称,但仍然不起作用