Hello list! I am sorry if the question has been asked thousand times, searching archives did not give me anything. -( Is FreeRADIUS natively capable of data consumption monitoring and limiting on per user basis. Let's say I want a user to be disabled (no messages to be generated just next authentication fails) after he downloads/uploads 1GB of data. Any hint in this direction would be highly appreciated. Thanks, Evgeny.
Hello anonymous! You can write a custom SQL query and include it when authenticating the user to determine if the user has or has not downloaded in excess of 1GB. Assuming of course that you're storing the accounting data in an SQL database. Regards, Ryan Williams
Dear all, Can you give me an example of how to set the cache-size ? This is my config for the counter. counter daily { filename = ${raddbdir}/db.daily key = User-Name count-attribute = Acct-Session-Time reset = daily counter-name = Daily-Session-Time check-name = Max-Daily-Session allowed-servicetype = Framed-User cache-size = 5000 # The RADIUS request is normally cached internally for a short period # of time, after the reply is sent to the NAS. The reply packet may be # lost in the network, and the NAS will not see it. The NAS will then # re-send the request, and the server will respond quickly with the # cached reply. # # If this value is set too low, then duplicate requests from the NAS # MAY NOT be detected, and will instead be handled as seperate requests. # # If this value is set too high, then the server will cache too many # requests, and some new requests may get blocked. (See 'max_requests'.) # # Useful range of values: 2 to 10 # cleanup_delay = 5 Regards Angus <<Email Disclaimer>> This e-mail and its attachments, if any, are confidential and contain information for an intended recipient. The Open University of Hong Kong (OUHK) disclaims any liability for any loss or damage if this e-mail is received by any person who is not the intended recipient. E-mail transmissions cannot be guaranteed to be completely secure, error or virus free. No responsibility is accepted by the OUHK for any loss or damage arising in any way from receipt or use thereof. Arrangements or statements appearing to bind OUHK are not binding upon OUHK unless made in accordance with OUHK's constitution and duly authorised. OUHK staff are expressly prohibited from breaching applicable law, infringing third party rights, making defamatory statements and committing tortious acts by e-mail communications.
Sun, 24 Jul 2011 23:42:19 -0700, Ryan Williams wrote:
Hello anonymous! You can write a custom SQL query and include it when authenticating the user to determine if the user has or has not downloaded in excess of 1GB. Assuming of course that you're storing the accounting data in an SQL database.
Regards, Ryan Williams
Hi Ryan, thanks for you reply. Where would I put this custom SQL query please? Evgeny.
Rizky Marunda Dinata Mon, 25 Jul 2011 06:34:04 -0700
Dear Evgeny,
Yes, freeradius is able to monitor and limit usage, for example will reject login after 1 GB of sum ( download+upload), please read info about sql-counter (http://wiki.freeradius.org/Rlm_sqlcounter)
Thank you very much Rizky for your hint! I've figured out how to use rlm_counter for the same purpose but I can restrict only based on Acct-Input-Octets or on Acct-Output-Octets. Is there a way using rlm_counter to sum up these counters to make a decision on reaching limit? Evgeny.
participants (3)
-
Angus JIANG Jian -
Evgeny Yurchenko -
Ryan Williams