僅使用 client.conf 無法從 freeradius 中的 nas 表讀取客戶端

僅使用 client.conf 無法從 freeradius 中的 nas 表讀取客戶端

我在 Centos 上安裝了 freeradius。

MySQL資料庫填入了一些資料用於測試,並配置了freeradiusd.conf和sql.conf。

RADIUS 伺服器能夠與 MySQL 資料庫連接,我可以從中對使用者進行身份驗證。我還配置了一個遠端 RADIUS 客戶端,它與我的強制門戶和 RADIUS 伺服器一起使用,但是,它僅在我在/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 相同的名稱,但仍然不起作用

相關內容