[strongSwan] How to use sqlcounter to disconnect a user after reaching the daily quota?

Houman houmie at gmail.com
Mon Dec 25 18:45:03 CET 2017


Hello & Merry Christmas.


I have managed to enable accounting after all and it seems that the module
sqlcounter is loaded too.

Looking at the documentation here
<https://freeradius.org/radiusd/man/rlm_counter.txt>

The  rlm_counter  module  provides  a general framework to measure
total data transferred in a given period. This is very useful in a
'Prepaid Service' situation, where a user has paid for a  finite
amount  of  usage and should not be allowed to use more than that
service.

This is perfect as I need exactly that.

It seems I have to change count_attribute to data usage in order to measure
the usage instead of time.

Nonetheless, I'm very confused how I'm supposed to utilise this module.

I can see the module is loaded when I run it as freeradius -X.

But how do I set it up to allow each user only 3 GB of data usage within a
month?
Or even for testing purposes 100KB on daily basis?
When the month or day has passed, then the user should be allowed access
again.

Which config file do I have to edit?

Many Thanks for your advice,
Houman
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.strongswan.org/pipermail/users/attachments/20171225/d15490a6/attachment.html>


More information about the Users mailing list