Community discussions

MikroTik App
 
someuser
Member Candidate
Member Candidate
Topic Author
Posts: 102
Joined: Tue Apr 13, 2010 7:05 am

Hotspot and keeping the clock ticking

Fri Sep 03, 2010 7:40 pm

In hotspot When a user is alloted an amount of time either via user under "limit uptime" or user profile "session timeout".

How does one keep the clock ticking, so that if user logs off time keeps running towards end of users time allotment.
e.g. the user purchases 4 hours of time. But user logs off and on multiple times trying to extend the allotment.

With User manager this can be handled properly, yet I can't see how's it's done in Hotspot.

Is this possible?
 
someuser
Member Candidate
Member Candidate
Topic Author
Posts: 102
Joined: Tue Apr 13, 2010 7:05 am

Re: Hotspot and keeping the clock ticking

Sat Sep 04, 2010 4:13 pm

How about a little help. Am I asking too much?
 
User avatar
neandero
Member Candidate
Member Candidate
Posts: 243
Joined: Fri Jul 17, 2009 11:43 am
Location: Inside Mind

Re: Hotspot and keeping the clock ticking

Sat Sep 04, 2010 4:28 pm

maybe queue>simple>time
check that if it can be helpful.
 
SurferTim
Forum Guru
Forum Guru
Posts: 4636
Joined: Mon Jan 07, 2008 10:31 pm
Location: Miramar Beach, Florida

Re: Hotspot and keeping the clock ticking

Sat Sep 04, 2010 4:30 pm

I think it is because there is no corresponding entry for session-timeout in the router. UserManager is probably your best bet. You can get support for it from this forum.

ADD: You might be able to disable/logout a user account with a scheduled script. Put the session-timeout value in comments and the use a script to disable the account and insure the client is logged off at the appropriate date/time. This may not be as easy as it appears at first. Much parsing and rearranging of the date will be required. You really require a Unix date/time stamp to do this. That allows the date/time to be a comparison. (< > =).

For example, today's date in my Linux server is
2010-09-04
and in Mikrotik
sep/04/2010
 
someuser
Member Candidate
Member Candidate
Topic Author
Posts: 102
Joined: Tue Apr 13, 2010 7:05 am

Re: Hotspot and keeping the clock ticking

Sat Sep 04, 2010 7:12 pm

I think it is because there is no corresponding entry for session-timeout in the router. UserManager is probably your best bet. You can get support for it from this forum.

ADD: You might be able to disable/logout a user account with a scheduled script. Put the session-timeout value in comments and the use a script to disable the account and insure the client is logged off at the appropriate date/time. This may not be as easy as it appears at first. Much parsing and rearranging of the date will be required. You really require a Unix date/time stamp to do this. That allows the date/time to be a comparison. (< > =).

For example, today's date in my Linux server is
2010-09-04
and in Mikrotik
sep/04/2010
Thanks Tim, guys...
I'd like to use UserManager and I know it works great if you want to give someone say 4 hours.
As they'd log in at say 8:00 a.m. and be disconnected at 12:00 noon. Regardless of the session time, uptime etc...
But, I'm limited at the moment to 50 active users in UserManager with the license I have.
So, I'll need to create users in Hotspot, but I don't want them to be on for more than amount of time credited.
Now that I think about it. I believe this could be implemented very easily in Hotspot.
And it's this way by design, Mikrotik wants you to purchase the license which allows more users via UserManager.
You think?
I'll try your suggestions.

T
 
SurferTim
Forum Guru
Forum Guru
Posts: 4636
Joined: Mon Jan 07, 2008 10:31 pm
Location: Miramar Beach, Florida

Re: Hotspot and keeping the clock ticking

Sat Sep 04, 2010 7:23 pm

UserManager should do what you want. I use FreeRADIUS, but the operation is similar on both.

I sell internet access by the day (24 hours) at 384K/1M per connection. I don't care about how many times they login and out, how long they are on during that time, nor how much they upload or download. But when their time has expired, the router disconnects them and they can no longer login until they purchase more time. You need ntp client set on the router and UserManager device.
 
someuser
Member Candidate
Member Candidate
Topic Author
Posts: 102
Joined: Tue Apr 13, 2010 7:05 am

Re: Hotspot and keeping the clock ticking

Sun Sep 05, 2010 7:05 am

UserManager should do what you want. I use FreeRADIUS, but the operation is similar on both.

I sell internet access by the day (24 hours) at 384K/1M per connection. I don't care about how many times they login and out, how long they are on during that time, nor how much they upload or download. But when their time has expired, the router disconnects them and they can no longer login until they purchase more time. You need ntp client set on the router and UserManager device.
My issue presently is. I only can get 50 users with level 5 license on UserManager.
I'm going to be providing to a large race event which may bring on upwards - 100-200 users.
So, I want to have as many people on Hotspot to keep UserManager running at less than 50.
Budget thing again.
Thanks
 
fewi
Forum Guru
Forum Guru
Posts: 7717
Joined: Tue Aug 11, 2009 3:19 am

Re: Hotspot and keeping the clock ticking

Sun Sep 05, 2010 7:23 am

FreeRADIUS is free if you have spare hardware.
 
someuser
Member Candidate
Member Candidate
Topic Author
Posts: 102
Joined: Tue Apr 13, 2010 7:05 am

Re: Hotspot and keeping the clock ticking

Sun Sep 05, 2010 8:18 am

Ahha, thanks.
 
SurferTim
Forum Guru
Forum Guru
Posts: 4636
Joined: Mon Jan 07, 2008 10:31 pm
Location: Miramar Beach, Florida

Re: Hotspot and keeping the clock ticking

Sun Sep 05, 2010 2:18 pm

FreeRADIUS/Linux is the way to go if you want to customize stuff. My SQL database is modified to suit my requirements. I added extra tables, and columns in current tables. Does anyone else have a 'purchase' table in their SQL database?

Also using Linux allows you to use Apache webserver! And email server software (postfix, sendmail)! And...

...and thanks for the karma! It is good to know when one's help is appreciated. :D

Who is online

Users browsing this forum: sergey343 and 19 guests