User disconnect

yzy-oui-fi yzy-oui-fi at
Thu Jun 20 12:54:52 CEST 2013

Here is some more informations about how we solve this issue for people
who use dd-wrt as chillispot hotspot (like you Dagia):
So first you should check that your router support or special firmware
(dd-wrt firmware base+ Ead-Ard powertools)

here is the database url:

then you should register the router loaded with the firmware in our
Ead-Ard server(keep cool it is free of any charge! :) )

here is the url to register your device:

there is also a wiki that explain how it works with our captive portal,
this will be a little bit different than yours, but this will give you a
good idea of the ead-ard system.

And is the server side:

1°) you should create a subdirectory to your web directory called
2°) you should create a mysql table in your freeradius database called
CREATE TABLE `heartbeat` (
  `mac` varchar(20) NOT NULL default '',
  `hostname` varchar(128) default NULL,
  `ssid` varchar(32) default NULL,
  `wanip` varchar(16) default NULL,
  `realip` varchar(16) default NULL,
  `thetime` datetime default NULL,
  `ext` varchar(255) default NULL,
  `notes` longtext,
  `nasid` varchar(255) default NULL,
  `om` varchar(1) NOT NULL default '1',
  PRIMARY KEY  (`mac`),
  UNIQUE KEY `hbind1` (`realip`,`mac`)

3°) in the wifi-1.1.1 directory place the heartbeat.php (see zip file
this file is based on wifigator kind of heartbeat, if you run freeradius
2 or higher you probably have to make some change in db table and field
4°) modify its mysql connection to your information

So if everything is ok every 15 minute your router should send its
online  status to the freeradius server(assumption your freeradius
server also run a php webserver and mysql is used to run freeradius).

Now you need a cron job ran on server side that will check if a router
is considered as down querying heartbeat table and compare last status
with the current time and act in radacct table to close opened

5°)here is the user session closing script 

you will need to run the following from cron job

"wget http://yourdomain/yourdirectory/checksession2close.php"

you could set the cron loop to 5 minutes , less  is not recommanded.

So here you are, with all this and with some mods, your session should
closed at least 20 minutes after your device went down


Le jeudi 20 juin 2013 à 09:02 +0200, yzy-oui-fi a écrit :

> I guess you will need an external client/server status script  (this
> is what we have done with our captiv portal server). the router send
> its status within a loop to the freeradius server, and the server will
> check the status sent avairage, if avairage exceed defined loop, then
> we  close every attached user account session. 
> Le mercredi 19 juin 2013 à 23:21 -0700, Dagia Dorjsuren a écrit : 
> > Hello,
> > 
> >     Does anyone know how to solve following issue? 
> > 
> > In this case :
> > 
> > 1. NAS (Chillispot based access point)
> > 2. Freeradius
> > 
> > If NAS is shutdowned, the freeradius keeps all user logins of that
> > NAS. In this case, the users session is alive. In fact, freeradius
> > doesn't know if NAS's status is shutdowned or running. Is there any
> > configuration that freeradius disconnects the users automatically
> > when NAS is shutdowned? On the other hand, I would like to terminate
> > the user's session when NAS is shutdowned or unavailable.
> > 
> > 
> > 
> > -
> > List info/subscribe/unsubscribe? See
> -
> List info/subscribe/unsubscribe? See

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>
-------------- next part --------------
A non-text attachment was scrubbed...
Type: application/zip
Size: 797 bytes
Desc: not available
URL: <>
-------------- next part --------------
A non-text attachment was scrubbed...
Type: application/zip
Size: 1435 bytes
Desc: not available
URL: <>

More information about the Freeradius-Users mailing list