Action on disconnet

Fajar A. Nugraha list at
Fri Dec 23 10:17:43 CET 2011

On Fri, Dec 23, 2011 at 3:44 PM, gvalzolgher at
<gvalzolgher at> wrote:
> Hi All,
> i'm news of newsletter

I believe the more accurate term is "mailing list" :)

>, hope to use it well.
> I'm studing about freeradius and i've installed a test machine, i would to
> known if it is possible to define actions to do when radius detects a user
> disconnections.
> (I'm thinking about to write some value to a second databases, but question
> is more general than write something to other db).
> Could you give me an advice ?

Generally speaking, radius (not just freeradius, ANY radius server)
does not "detects a user disconnections". What happens is radius will
know a user is disconnected only if the NAS sends accounting-stop
packets. If the NAS does not send accounting-stop (or does not send
accounting packets at all), then radius will not know whether the user
is disconnected or not.

If freeradius DOES accept an accounting-stop packet, you can pretty
much configure anything you want with it. Run "man unlang". Using
unlang, you could make a rule that says a particular module (e.g.
rlm_perl) will be run ONLY when the packet is accounting stop. And if
you use rlm_perl, you could pretty much do anything that perl can do,
including executing a script, insert data to a database, make HTTP
connection, etc.


More information about the Freeradius-Users mailing list