rlm_counter(5)
π NAME: rlm_counter(5) β FreeRADIUS Module π
Okay so bestie, this is the FreeRADIUS Module manual page for rlm_counter β the counter module that gives you access control based on accumulated usage of a resource. We're talking total time online in a given period, total data transferred in a given period, etc. It's giving Prepaid Service main character energy: a user paid for a finite amount of usage and should not be allowed to use more than that service. Collection, monitoring, and replenishment of prepaid services? Beyond the scope of this module, fr fr β not its job, periodt. π
β¨ DESCRIPTION β¨
The rlm_counter module provides a general framework to allow access based on accumulated usage of a resource, such as total time online in a given period, total data transferred in a given period, etc. 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. Collection, monitoring, and replenishment of prepaid services are beyond the scope of this module. iykyk π«Ά
The main configuration items to be aware of are:
filenameβ the filename where the usage data is stored. basic but essential.keyβ an attribute which will be present in theAccess-Requestto be used as the 'index' value for the counter. A counter entry is tracked for each unique key. The most likely key you will want to use isUser-Name. lowkey the vibe check of this whole module.count_attributeβ an attribute which will be used to increment the counter value. If this attribute isAcct-Session-Timeor an integer value, the counter data is incremented by the Attribute value. For all other attribute types the counter is incremented by one. numbers go brrr, or just +1.resetβ how frequently the counter data should be set back to0. Valid values for this variable are:hourly,daily,weekly,monthly,ornever(yes, the source prints "or never" mashed together like that). Alternatively, it can be user defined, in the formnum[hdwm]:numis a numeric value, followed by one or none of the following letters βh: hours,d: days,w: weeks,m: months. slay, customizable reset era.check_nameβ this defines an attribute name which will be registered by the counter module and can be used to set the maximum allowed value for the counter after which the user is rejected. IfDaily-Session-Timeis set, you can use the following syntax in theUsersfile to set a cap of3600seconds (8hours ):
DEFAULT Max-Daily-Session := 3600
reply_nameβ this is the name of the attribute which will contain the remaining value for the counter in the reply packet when the user is successfully authorized. The default attribute name isSession-Timeout. cute little leftover budget carrier.allowed_service_typeβ this can be used to only apply the limitations to specific service types of sessions. For example, setting this toFramed-Userwill only apply the counter module toFramedsessions, excluding other types such asTelnetorRlogin. selective and iconic.cache_sizeβ the maximum size of the cache to be used by the module. The default is1000. cache money, but make it configurable.
π NOTES π
This module registers an attribute, so it should be added to the instantiate section, to be called on server startup. When used in the authorize section, it must come after any modules which set the check_name attribute. do not skip this ordering, bestie β the vibe check will fail. π
πΈ SECTIONS πΈ
instantiateauthorizeaccounting
three little sections, one big counter moment β¨
π¦ FILES π¦
/etc/raddb/radiusd.conf
π₯ SEE ALSO π₯
radiusd(8)radiusd.conf(5)rlm_sqlcounter(5)
the friend group of related manpages π
π AUTHOR π
Chris Parker, cparker@segv.org
Catch you later, bestie π«Ά β this was rlm_counter(5) from the FreeRADIUS Module, dated 13 March 2004. Periodt. π
β¨
π¦ where this page comes from
- alpine 3.22: freeradius-doc 3.0.27-r1 Β· GPL-2.0-or-later
- alpine 3.23: freeradius-doc 3.0.27-r2 Β· GPL-2.0-or-later
- alpine 3.24: freeradius-doc 3.0.27-r3 Β· GPL-2.0-or-later
- arch rolling: freeradius 3.2.10-4 Β· GPL-2.0-or-later
- centos-stream 10: freeradius 3.2.8-2.el10 Β· GPL-2.0-or-later AND LGPL-2.0-or-later
- centos-stream 9: freeradius 3.0.27-4.el9 Β· GPLv2+ and LGPLv2+
- fedora 43: freeradius 3.2.7-6.fc43 Β· GPL-2.0-or-later AND LGPL-2.0-or-later
- fedora 43: freeradius 3.2.7-6.fc43 Β· GPL-2.0-or-later AND LGPL-2.0-or-later
- fedora 43: freeradius 3.2.8-2.fc43 Β· GPL-2.0-or-later AND LGPL-2.0-or-later
- fedora 43: freeradius 3.2.8-2.fc43 Β· GPL-2.0-or-later AND LGPL-2.0-or-later
- fedora 44: freeradius 3.2.8-3.fc44 Β· GPL-2.0-or-later AND LGPL-2.0-or-later
- fedora 44: freeradius 3.2.8-3.fc44 Β· GPL-2.0-or-later AND LGPL-2.0-or-later
- opensuse-leap 16.0: freeradius-server 3.2.5-160000.2.2 Β· GPL-2.0-only AND LGPL-2.1-only
- opensuse-leap 16.0: freeradius-server 3.2.5-160000.2.2 Β· GPL-2.0-only AND LGPL-2.1-only
- opensuse-leap 16.0: freeradius-server 3.2.5-160000.2.2 Β· GPL-2.0-only AND LGPL-2.1-only
- opensuse-leap 16.0: freeradius-server 3.2.5-160000.2.2 Β· GPL-2.0-only AND LGPL-2.1-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms