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

Houman houmie at
Thu Dec 28 09:28:10 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

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

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 session time, but I'm not quite sure where to find the
accepted values.

Nonetheless, I'm very confused how I'm supposed to use 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
Or even for testing purposes 500KB on daily basis?
When the month or the day has passed, then the user should be allowed
access again.

Which config files do I have to edit?

Many Thanks for your advice,

More information about the Freeradius-Users mailing list