2016-08-11 - Re: [GRASE-Hotspot] Re: Power Off and User Re-Login

Header Data

From: Edward Allen <yb***j@gmail.com>
Message Hash: 6d4c37d869cbf14841e3b89c2893e9e54641df08946ada4deb1389c333feddf3
Message ID: <CAGUY4fyKWsZ7ivLkyOc4FGOPTShfj0qVd4qPBuk80Y99U7L_gQ@mail.gmail.com>
Reply To: <29256f5f-631c-4037-86c4-deb336f9b6b6@grasehotspot.org>
UTC Datetime: 2016-08-11 09:56:42 UTC
Raw Date: Thu, 11 Aug 2016 16:56:42 +0000

Raw message

I like the direction of this discussion,  will attempt asap,  this is much
needed.

On Thu, Aug 11, 2016, 5:00 AM Hotspotuser <jo***s@algardata.pt> wrote:

> Your best option, at least it's what i recomend is:
>
> Capture in PHP the output of this linux command, which gives you the users
> that are currently connected to your hotspot but have not yet login in
> (after you reboot/power-on):
>
> chilli_query list | grep "dnat" | awk '{print $1}'
>
> Then query your radius radacct database table to get the sessions that where not closed by the hotspot:
>
>
> SELECT CallingStationId, UserName, FramedIpAddress, AcctStopTime FROM radius.radacct WHERE UserName != 'CoovaChilli' and AcctStopTime is null Group BY CallingStationId
>
> This will list of all the hotspot logins that had no StopTime, which usually means the hotspot rebooted without shutting down. When you issue the shutdown command freeradius closes all the active sessions.
>
> You can change the query to get for instance the sessions that were created in the last day. Change the query as needed.
>
>
> Cross that list of MAC addresses with the one you got from the chilli_query and for each match run the command:
>
>
> chilli_query authorize mac *XX**-XX-XX-XX-XX-**XX* username *USERNAME*
>
> Replacing *XX-XX-XX-XX-XX-**XX* and *USERNAME* with the values you got from the chilli_query.
>
>
> All connected users with data/time available will automatically connect, without user intervension. All that are already expired will still be logged out.
>
>
> Note that im using the *MAC *parameter instead of *IP *on the chilli_query authorize.
>
>
> This is what i use in our solution, and i call this script at every hotspot boot, you can off course have a link on your hotspot solution to run this PHP Script manually.
>
>
>
> quarta-feira, 10 de Agosto de 2016 às 19:16:44 UTC+1, Eliot Ness escreveu:
>>
>> I cant make it work, i see the example
>>
>> # chilli_query list
>>        00:0D:XX:XX:XX:XX 10.1.0.3 dnat 46c83f70000 0 - 0/0 0/0 http://url.com
>>        # chilli_query authorize ip 10.1.0.3 sessiontimeout 60 username me
>>        # chilli_query list
>>        00:0D:XX:XX:XX:XX 10.1.0.3 pass 46c83f70000 1 me 2/0 2/0 http://url.com
>>        # chilli_query logout 00:0D:XX:XX:XX:XX
>>
>> Need an extra routine or something else
>>
>>
>>
>> On Thursday, June 2, 2016 at 9:40:51 AM UTC+3, Eliot Ness wrote:
>>>
>>> At least one Pi2 comes yesterday in my hands, and ....grase run again.
>>> Detailed tutorial steps install on next days.
>>>
>>> As simple question : On power off or reboot, user have login again,
>>> except if admin store mac adr.
>>>
>>> Is there any way on grase to remember users after reboot ? So no need
>>> user to login again....
>>>
>>> Anyone?
>>>
>> --
> This mailing list is for the Grase Hotspot Project http://grasehotspot.org
> ---
> You received this message because you are subscribed to the Google Groups
> "Grase Hotspot" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to gr***e@grasehotspot.org.
> To post to this group, send email to gr***t@grasehotspot.org.
> Visit this group at
> https://groups.google.com/a/grasehotspot.org/group/grase-hotspot/.
> To view this discussion on the web visit
> https://groups.google.com/a/grasehotspot.org/d/msgid/grase-hotspot/29256f5f-631c-4037-86c4-deb336f9b6b6%40grasehotspot.org
> <https://groups.google.com/a/grasehotspot.org/d/msgid/grase-hotspot/29256f5f-631c-4037-86c4-deb336f9b6b6%40grasehotspot.org?utm_medium=email&utm_source=footer>
> .
>

Thread