FreeRadius2流量计数器不起作用

时间:2016-04-21 15:42:11

标签: vpn radius freeradius ppp

我已将此块添加到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

1 个答案:

答案 0 :(得分:0)

尝试将radiusd.conf块移至sql/mysql/counter.conf