Community discussions

MikroTik App
 
dim31
just joined
Topic Author
Posts: 6
Joined: Wed Jul 15, 2009 1:40 pm

Script to save hotspot active users

Mon Jul 20, 2009 4:22 pm

Hello,

I have 2 mikrotiks which work with vrrp. When the first Mikrotik goes down, I would like to restore on the other mikrotik all active users.
I thought to use export, fetch and import but I didn't find how to export the good informations, there is no ip hotspot active export or something like that... Do you have an idea or a script which is able to do that?

Thank you.
 
User avatar
mrz
MikroTik Support
MikroTik Support
Posts: 7044
Joined: Wed Feb 07, 2007 12:45 pm
Location: Latvia
Contact:

Re: Script to save hotspot active users

Mon Jul 20, 2009 4:26 pm

Use radius server to store client authentication information and clone hotspot configuration on both routers.
 
dim31
just joined
Topic Author
Posts: 6
Joined: Wed Jul 15, 2009 1:40 pm

Re: Script to save hotspot active users

Mon Jul 20, 2009 4:53 pm

thank you for your answer.

I use freeradius, in fact I want to restore all hotspot active users on the second mikrotik in order to be able to remove all these sessions on the radius; indeed, when my Wan interface goes down, the communication between radius and the first mikrotik is cut, so I would like my second mikrotik to be able to remove all these connexions to let the users log in again.
 
dondee
just joined
Posts: 1
Joined: Tue Feb 09, 2010 4:49 am

Re: Script to save hotspot active users

Thu Jun 24, 2010 12:46 pm

I have the same problem with this, is there anybody can give the solution?
thx
 
fewi
Forum Guru
Forum Guru
Posts: 7717
Joined: Tue Aug 11, 2009 3:19 am

Re: Script to save hotspot active users

Sat Aug 14, 2010 4:53 pm

You cannot do that from RouterOS. Any solution is going to have to be based on the RADIUS server (hack up the simultaneous use functionality to enforce only one login per NAS IP?) or on a third server that monitors VRRP failover and logs into the AAA to delete sessions.
 
User avatar
omega-00
Forum Guru
Forum Guru
Posts: 1167
Joined: Sat Jun 06, 2009 4:54 am
Location: Australia
Contact:

Re: Script to save hotspot active users

Mon Sep 13, 2010 6:00 am

I've investigated this previously.

It doesn't appear possible with hotspot at this time, however pppoe sessions should automatically re-login on the new router as soon as the vrrp fallover takes place.
That's simply due to the fact that pppoe sessions are normally set to re-auth on any drops, whereas the hotspot login requires physical user intervention.

You could try to offer both hotspot and pppoe logins for your users to give them the choice, however the hotspot side of this is simply not possible without some sort of hack to force sessions to start on the hotspot without a user login.

Thought: If you wanted to enable the mac-address login you could try copying these between the routers every couple of minutes or something similar.
 
Etza
newbie
Posts: 46
Joined: Tue May 31, 2011 10:33 pm

Re: Script to save hotspot active users

Thu Sep 13, 2012 3:17 pm

I've investigated this previously.

It doesn't appear possible with hotspot at this time, however pppoe sessions should automatically re-login on the new router as soon as the vrrp fallover takes place.
That's simply due to the fact that pppoe sessions are normally set to re-auth on any drops, whereas the hotspot login requires physical user intervention.

You could try to offer both hotspot and pppoe logins for your users to give them the choice, however the hotspot side of this is simply not possible without some sort of hack to force sessions to start on the hotspot without a user login.

Thought: If you wanted to enable the mac-address login you could try copying these between the routers every couple of minutes or something similar.

thx for re!!!
but i want any easy,
exable:
it is posible and easy to run script (ip hotspot active print count-only) on login and inform html page from txt file ??

thx
br

Who is online

Users browsing this forum: No registered users and 22 guests