Hello, I have a problem with sqlcounter. I am using a 1.1.0 version of freeradius. I have that problem: When I set a atribute Max-Daily-Session := 30 the user can connect after total time of 30 sec radius kicks him, but he can re connect, I don't know where is the source of the problem, please help me. my sqlcounter.conf looks just like this: sqlcounter noresetcounter { counter-name = Max-All-Session-Time check-name = Max-All-Session sqlmod-inst = sql key = User-Name reset = never query = "SELECT SUM(AcctSessionTime) FROM radacct WHERE UserName='%{%k}'" } sqlcounter dailycounter { driver = "rlm_sqlcounter" counter-name = Daily-Session-Time check-name = Max-Daily-Session sqlmod-inst = sqlcca3 key = User-Name reset = daily query = "SELECT SUM(AcctSessionTime - GREATEST((%b - UNIX_TIMESTAMP(AcctStartTime)), 0)) FROM radacct WHERE UserName='%{%k}' AND UNIX_TIMESTAMP(AcctStartTime) + AcctSessionTime > '%b'" } sqlcounter monthlycounter { counter-name = Monthly-Session-Time check-name = Max-Monthly-Session sqlmod-inst = sqlcca3 key = User-Name reset = monthly query = "SELECT SUM(AcctSessionTime - GREATEST((%b - UNIX_TIMESTAMP(AcctStartTime)), 0)) FROM radacct WHERE UserName='%{%k}' AND UNIX_TIMESTAMP(AcctStartTime) + AcctSessionTime > '%b'" } -- Z powazaniem Przemyslaw Backiel
I'm not an expert in this config, but i thinh the time is in second. So you know houer have 3600 seconds, so dont be suproise if radius is kicking you off because you told him to kick user after 30 seconds ;) ----- Original Message ----- From: "Przemysław Backiel" <przemyslaw.backiel@backiel.com.pl> To: "FreeRadius users mailing list" <freeradius-users@lists.freeradius.org> Sent: Wednesday, March 01, 2006 5:21 PM Subject: problems with sqlcounter
Hello,
I have a problem with sqlcounter. I am using a 1.1.0 version of freeradius. I have that problem: When I set a atribute Max-Daily-Session := 30 the user can connect after total time of 30 sec radius kicks him, but he can re connect, I don't know where is the source of the problem, please help me.
my sqlcounter.conf looks just like this:
sqlcounter noresetcounter { counter-name = Max-All-Session-Time check-name = Max-All-Session sqlmod-inst = sql key = User-Name reset = never
query = "SELECT SUM(AcctSessionTime) FROM radacct WHERE UserName='%{%k}'"
}
sqlcounter dailycounter { driver = "rlm_sqlcounter" counter-name = Daily-Session-Time check-name = Max-Daily-Session sqlmod-inst = sqlcca3 key = User-Name reset = daily
query = "SELECT SUM(AcctSessionTime - GREATEST((%b - UNIX_TIMESTAMP(AcctStartTime)), 0)) FROM radacct WHERE UserName='%{%k}' AND UNIX_TIMESTAMP(AcctStartTime) + AcctSessionTime > '%b'"
}
sqlcounter monthlycounter { counter-name = Monthly-Session-Time check-name = Max-Monthly-Session sqlmod-inst = sqlcca3 key = User-Name reset = monthly
query = "SELECT SUM(AcctSessionTime - GREATEST((%b - UNIX_TIMESTAMP(AcctStartTime)), 0)) FROM radacct WHERE UserName='%{%k}' AND UNIX_TIMESTAMP(AcctStartTime) + AcctSessionTime > '%b'"
}
-- Z powazaniem Przemyslaw Backiel
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
debik napisał(a):
I'm not an expert in this config, but i thinh the time is in second. So you know houer have 3600 seconds, so dont be suproise if radius is kicking you off because you told him to kick user after 30 seconds ;) I Want radius to kick me off after 30 sec per day, but now, when clock tick 30 sec, radius kick me of but after that I can re connect - so, when dailt time off, I should not be able to re connect.
-- Z powazaniem Przemyslaw Backiel
It seems that the sum of check-item AcctSessionTime is always 0 in your case. Are you sure that the accounting start and stop records are being updated (inserted) into radacct table. Suyash Shrestha
Suyash napisał(a):
It seems that the sum of check-item AcctSessionTime is always 0 in your case. Are you sure that the accounting start and stop records are being updated (inserted) into radacct table.
Suyash Shrestha Yes, I am sure..
the whole problem is that, radius kick mi of after 30 sec - as max daily session is set. It is possible that query in sqlcounter.conf is wrong? -- Z powazaniem Przemyslaw Backiel
participants (3)
-
debik -
Przemysław Backiel -
Suyash