Disconnect users hanging

Julio Fsnet julio.fsnet at gmail.com
Wed Mar 19 17:27:25 CET 2014


Thanks Again. I will test and then post the result.
Clayton, you are where? have skype?


2014-03-19 12:01 GMT-03:00 Clayton Alves <clayton.aa at gmail.com>:

> Freeradius already have this script. It's called "checkrad".
>
> It is included in freeradius package.
>
> To enable it, you will need to uncomment in dialup.conf the following
> parameters: simul_count_query, simul_verify_query.
>
> Restart freeradius.
>
> It works like this: Every time freeradius receives an auth packet, if the
> user is hanging in database, freeradius calls the checkrad script. The role
> of this is script is to connect back to the router and check if the user is
> really connected to it.
>
> It then returns to freeradius an exit code (1 means user is already
> connected to the router (multiple login attempt), 0 means user is hang on
> database). In case of '0', freeradius let the user login.
>
> You can roll your own script if you want to. It's easy. I've made this
> simplified version for my needs (only work with mikrotik routers):
> https://gist.github.com/claytonaalves/1601702
>
>
> Clayton A. Alves <http://claytonaalves.github.com>
>  *claytonaalves*
>  +55 66 9233-3406
>
>
> 2014-03-18 13:34 GMT-04:00 Julio Fsnet <julio.fsnet at gmail.com>:
>
> huum thank's. I'll test this alternative. What I would like is to put a
>> script in the processes of freeradius for every time a user attempts to
>> authenticate, do check if you are hanging or not. If he drops hanging
>> before continuing.
>>
>>
>> 2014-03-18 14:09 GMT-03:00 Clayton Alves <clayton.aa at gmail.com>:
>>
>>> I've got the same problem using mikrotik routers.
>>> Sometimes it just doesn't send AcctTerminate packets. Maybe its a router
>>> problem.
>>>
>>> The solution I found is set Interim-Update time to 5 minutes and put
>>> this script in cron to run regularly.
>>>
>>> https://gist.github.com/claytonaalves/9165004
>>>
>>> This works for me... maybe it helps.
>>>
>>>
>>> Clayton A. Alves <http://claytonaalves.github.com>
>>>  *claytonaalves*
>>>  +55 66 9233-3406
>>>
>>>
>>> 2014-03-18 11:11 GMT-04:00 Julio Fsnet <julio.fsnet at gmail.com>:
>>>
>>> Yes, I am use MySQL with InnoDB Engine
>>>>
>>>>
>>>> 2014-03-18 8:43 GMT-03:00 Clayton Alves <clayton.aa at gmail.com>:
>>>>
>>>>> Are you using MySQL?
>>>>> If 'yes', are the tables using InnoDB engine ?
>>>>>
>>>>> Clayton A. Alves <http://claytonaalves.github.com>
>>>>>  *claytonaalves*
>>>>>  +55 66 9233-3406
>>>>>
>>>>>
>>>>> 2014-03-17 10:12 GMT-04:00 Julio Fsnet <julio.fsnet at gmail.com>:
>>>>>
>>>>>>  I have a problem. When the user tries to connect and already has a
>>>>>> connection to it, an error pops multiple logins. I need to write this mysql
>>>>>> error log somewhere or else knock the hanging connection, how can I do this?
>>>>>>
>>>>>>
>>>>>> -
>>>>>> List info/subscribe/unsubscribe? See
>>>>>> http://www.freeradius.org/list/users.html
>>>>>>
>>>>>
>>>>>
>>>>> -
>>>>> List info/subscribe/unsubscribe? See
>>>>> http://www.freeradius.org/list/users.html
>>>>>
>>>>
>>>>
>>>> -
>>>> List info/subscribe/unsubscribe? See
>>>> http://www.freeradius.org/list/users.html
>>>>
>>>
>>>
>>> -
>>> List info/subscribe/unsubscribe? See
>>> http://www.freeradius.org/list/users.html
>>>
>>
>>
>> -
>> List info/subscribe/unsubscribe? See
>> http://www.freeradius.org/list/users.html
>>
>
>
> -
> List info/subscribe/unsubscribe? See
> http://www.freeradius.org/list/users.html
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeradius.org/mailman/private/freeradius-users/attachments/20140319/600e8b1f/attachment.html>


More information about the Freeradius-Users mailing list