Freeradius Max-Daily-Session in custom authentication
Actually i have AAA by mysql and everything work fine. Especially the use *Max-Daily-Session*attribute to disconnect the user after 10min (600sec) connection. I recently changed the way authenticazione using a custom php script. In sites-enabled/default file: authorize{ update control { Auth-Type := `/usr/bin/php -f /etc/raddb/yourscript.php '%{User-Name}' '%{User-Password}' '%{Client-IP-Address}'`} In /etc/freeradius/users: DEFAULT Auth-Type = AcceptExec-Program-Wait = "/usr/bin/php -f /etc/raddb/attributes.php '%{User-Name}' '%{User-Password}' '%{Client-IP-Address}'" In attributes.php: <?php $User = $argv[1]; $Pass = $argv[2]; $Ip = $argv[3];if ($User == "test") echo "Max-Daily-Session:=600";?> It seems that the server does not care about the Max-Daily-Session attribute and does not send the Packet of Disconnect. What changes between mysql and custom authentication?
On Apr 1, 2016, at 3:42 AM, Polarix <polarix@tiscalinet.it> wrote:
It seems that the server does not care about the Max-Daily-Session attribute and does not send the Packet of Disconnect.
The server just writes the session information to a database. It doesn't periodically poll the database, and look for users to reject. You will have to write a "cron" job to poll the database and disconnect users. Alan DeKok.
Why with sql authentication does freeradius disconnect the user instead ? Thank you. Il 01/apr/2016 14:19, "Alan DeKok" <aland@deployingradius.com> ha scritto:
On Apr 1, 2016, at 3:42 AM, Polarix <polarix@tiscalinet.it> wrote:
It seems that the server does not care about the Max-Daily-Session attribute and does not send the Packet of Disconnect.
The server just writes the session information to a database. It doesn't periodically poll the database, and look for users to reject.
You will have to write a "cron" job to poll the database and disconnect users.
Alan DeKok.
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
On Apr 1, 2016, at 8:52 AM, Polarix <polarix@tiscalinet.it> wrote:
Why with sql authentication does freeradius disconnect the user instead ?
FreeRADIUS never sends a CoA packet unless you tell it to. What's probably happening is that the NAS is disconnecting the user. Or, the user is trying to login after using up all their time, and FreeRADIUS is sending an Access-Reject. As always, run the server in debug mode to see what it's doing. And no, it doesn't send a disconnect packet after a timeout. That functionality just doesn't exist in the server. Alan DeKok.
It (maybe nas) disconnect users after 10min exactly and user can't login anymore till the day after. All this with sql. Problably....it's important you to know i enabled dailycounter module. I forgot to say above. I'm sorry. Il 01/apr/2016 15:06, "Alan DeKok" <aland@deployingradius.com> ha scritto:
On Apr 1, 2016, at 8:52 AM, Polarix <polarix@tiscalinet.it> wrote:
Why with sql authentication does freeradius disconnect the user instead ?
FreeRADIUS never sends a CoA packet unless you tell it to.
What's probably happening is that the NAS is disconnecting the user.
Or, the user is trying to login after using up all their time, and FreeRADIUS is sending an Access-Reject.
As always, run the server in debug mode to see what it's doing.
And no, it doesn't send a disconnect packet after a timeout. That functionality just doesn't exist in the server.
Alan DeKok.
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
participants (2)
-
Alan DeKok -
Polarix