FreeRadius记录登陆的错误信息到数据库
FreeRadius记录登陆的错误信息到数据库
在modules里面添加attr_rewrite,内容为
1 2 3 4 5 6 7 8 9 10 | attr_rewrite sanereplymessage { attribute = Reply-Message searchin = reply searchfor = "\n|\r" replacewith = "" ignore_case = no new_attribute = no max_matches = 10 append = no } |
然后修改default,在sql前面增加sanereplymessage
1 2 3 4 5 6 | Post-Auth-Type REJECT { .. sanereplymessage sql .. } |
最后按照FreeRADIUS 2.x 记录认证者信息 修改usr/local/etc/raddb/sql/mysql/dialup.conf
1 2 3 4 5 6 | postauth_query = "INSERT INTO ${postauth_table} \ (username, pass, reply, authdate, calledstationid, nasipaddress, replymessage) \ VALUES ( \ '%{User-Name}', \ '%{%{User-Password}:-%{Chap-Password}}', \ '%{reply:Packet-Type}', '%S', '%{Calling-Station-Id}', '%{NAS-IP-Address |
目录 返回
首页