User disconnect

yzy-oui-fi yzy-oui-fi at hotmail.fr
Thu Jun 20 16:49:58 CEST 2013


this is a sample if you prefer innodb or what ever...No probleme.


Le jeudi 20 juin 2013 à 12:30 +0100, Arran Cudbard-Bell a écrit :

> > 
> > 1°) you should create a subdirectory to your web directory called wifi-1.1.1
> > 2°) you should create a mysql table in your freeradius database called heartbeat
> > ----------------
> > 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`)
> > ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
> 
> Why are you telling users to cripple their database by using MyISAM? They should be using InnoDB, though honestly SQLite would be quite sufficient for something this simple.
> > 
> > 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 name)
> > 4°) modify its mysql connection to your information
> 
> Or you can do what I said, which is simpler and doesn't add another dependency.
> 
> > 
> > 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 session....
> > 
> > 5°)here is the user session closing script
> 
> No, this is ridiculously over complicated, if your NAS supports interim updates just do it how I said.

DD-WRT do not support it untill now(interim updates) unfortunatly....
over complicated maybe, but in our case we implement our webui to use
this in order to also inject command line in remote routers and manage
it if required.


> 
> -Arran
> 
> Arran Cudbard-Bell <a.cudbardb at freeradius.org>
> FreeRADIUS Development Team
> 
> -
> List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
> 


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20130620/345a656f/attachment.html>


More information about the Freeradius-Users mailing list