User disconnect
Arran Cudbard-Bell
a.cudbardb at freeradius.org
Thu Jun 20 13:30:19 CEST 2013
>
> 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.
-Arran
Arran Cudbard-Bell <a.cudbardb at freeradius.org>
FreeRADIUS Development Team
More information about the Freeradius-Users
mailing list