我已将此块添加到radiusd.conf
sqlcounter monthlytrafficcounter {
vcounter-name = Monthly-Traffic
check-name = Max-Monthly-Traffic
reply-name = Monthly-Traffic-LIMIT
sqlmod-inst = SQL
key = User-Name
reset = monthly
query = "SELECT SUM(acctinputoctets + acctoutputoctets) FROM radacct WHERE UserName='%{%k}' AND UNIX_TIMESTAMP(AcctStartTime) > '%b'"
}
并添加了ditrctionary
ATTRIBUTE Max-Monthly-Traffic 3003 integer
ATTRIBUTE Monthly-Traffic-Limit 3004 integer
然后将monthlytrafficcounter
添加到authorize
/etc/freeradius/sites-enabled/default
但它不起作用
Max-Monthly-Traffic
在MySQL表radgroupcheck
中定义,用户已添加到radusergroup
虽然用户已达到流量限制,但仍可由FreeRadius授权: http://i.stack.imgur.com/RIVsZ.jpg
答案 0 :(得分:0)
尝试将radiusd.conf
块移至sql/mysql/counter.conf