Community discussions

MikroTik App
 
dfilkovi
just joined
Topic Author
Posts: 4
Joined: Tue Jul 04, 2006 2:58 pm

Free Hotspot user time limitation

Tue Jul 04, 2006 3:06 pm

I configured the hotspot on my mikrotik and everything works fine.
What I need now is a way to limit hotspot users to a 30 minutes per day usage.
I configured one hotspot user which can have 5 people in the same time logged in. But I need something that will disconnect every user that exceeds 30 minute per day time limit, but will not block that user account if first user exceeds 30min. So in general that a bunch of people can log in using same username and password but each of them can stay online only for 30 minutes per day.

Thanks.
 
cmit
Forum Guru
Forum Guru
Posts: 1547
Joined: Fri May 28, 2004 12:49 pm
Location: Germany

Tue Jul 04, 2006 3:36 pm

The hotspot "trial user" feature of RouterOS does exactly this!
See the MikroTik Hotspot docs: http://www.mikrotik.com/docs/ros/2.9/ip/hotspot.

If you put "30m/1d" as value for the trial-uptime parameter and active (only) the trial login method, each user (which is identified by his MAC address) can login for 30 minutes every day without having to authenticate.

Does that help?

Best regards,
Christian Meis
 
dfilkovi
just joined
Topic Author
Posts: 4
Joined: Tue Jul 04, 2006 2:58 pm

Tue Jul 04, 2006 5:23 pm

But I also need some of the users to have full access without limiting time, the diference will be made through login accounts.
Users that will use internet for free will be limited to 5kB download and that time limitation of 30min, but I need other users to have access according to user account settings I provide.
 
cmit
Forum Guru
Forum Guru
Posts: 1547
Joined: Fri May 28, 2004 12:49 pm
Location: Germany

Tue Jul 04, 2006 5:33 pm

You can configure the hotspot to allow the free trial users and assign a special profile for the trial (free) users (limiting to 5 kb, for example).

If you configure "normal" hotspot users, those will of course be able to use your service without limitations (or only the limitation you impose on them)...

Best regards,
Christian Meis
 
caribou
just joined
Posts: 19
Joined: Sun Feb 12, 2006 10:11 pm

Wed Aug 02, 2006 2:14 pm

I've been trying to do this for the last couple hours...exactly How does one have the trial users and the regular subscribers on the same hotspot?

Login methods checked for my hotspot are: http chap, cookie, trial

I made a trial user profile with username "guest" and password "guest" and linked it to a trial user profile which, in turn, is linked to the trial login config parameters. but when I log in to this "guest" user it does not shut off after 10 minutes (the amount I set on the 'trial' login configuration.). When I set an uptime limitation of 10 minutes directly on the trial user's profile also (to match the trial login config parameters) the "guest" user name stops working (of course) after 10 minutes, but no other "guest" can ever log in...I know why this does not work...want to know what will...

Help please...
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 26912
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia
Contact:

Fri Aug 04, 2006 2:40 pm

Username for trial user is in format:
T-<mac>
where <mac> is replaced with MAC address of a client.

Trial users are not added by hand. They are created automatically by hotspot
on first trial login for every MAC. Those trial users appear as dynamic
under "/ip hotspot user". limit-uptime is set for each of them automatically
from trial-uptime setting.
Trial (dynamic) users are automatically deleted after some time (second half
or trial-uptime setting). It allows the same client (MAC address) to use
trial method again.
 
caribou
just joined
Posts: 19
Joined: Sun Feb 12, 2006 10:11 pm

Fri Aug 04, 2006 6:16 pm

ok, when I check the "trial" login method, clear out the cookies and active users and then try to "surf on in" to my hotspot "clean" like someone just stumbling on the hotspot for the first time, I still get a login screen... Where's the "trial" feature? Hotspot won't let me on = no free trial. again, what am I doing wrong?
 
User avatar
bjohns
Member Candidate
Member Candidate
Posts: 271
Joined: Sat May 29, 2004 4:11 am
Location: Sippy Downs, Australia
Contact:

Mon Aug 07, 2006 8:09 am

Are you using the default login page or a custom one? There's a dynamic variable on the default one that detects whether the trial user feature is enabled or not and provides a link if it is enabled.

What I like to know is what is the best way to enable the trial user feature using a remote server - do I send back the T-<MAC> user/pass to the MT as a post/get as per usual?
 
caribou
just joined
Posts: 19
Joined: Sun Feb 12, 2006 10:11 pm

Mon Aug 07, 2006 2:31 pm

Thanks, I'm getting closer to this...
I did customize the "login" page and Looks like I may have, out of ignorance, crippled or removed that trial user link...any one have an example of what the html code looks like that allows the trial user access on the login page? I can use the info to compair it to my "customized" login page & fix what I broke.
 
User avatar
bjohns
Member Candidate
Member Candidate
Posts: 271
Joined: Sat May 29, 2004 4:11 am
Location: Sippy Downs, Australia
Contact:

Tue Aug 08, 2006 2:33 am

<div class="notice" style="color: #c1c1c1; font-size: 9px">Please log on to use the mikrotik hotspot service<br />$(if trial == 'yes')Free trial available, <a style="color: #FF8080"href="$(link-login-only)?dst=$(link-orig-esc)&username=T-$(mac-esc)">click here</a>.$(endif)</div><br />
What I like to know is what is the best way to enable the trial user feature using a remote server - do I send back the T-<MAC> user/pass to the MT as a post/get as per usual?
And I just got that working - pretty easy, works well. Just sent back the URL similar to:

<a href="https://<nas_ip>/login?dst=<link-orig>&username=T-<mac>">

Of course that could be made tidy by using more appropriate variables from the MT Router.

It'd be nice to have trial data limits as well.
 
User avatar
chimaster
Member Candidate
Member Candidate
Posts: 133
Joined: Tue Feb 07, 2006 8:54 am
Location: Queenstown
Contact:

Re: Free Hotspot user time limitation

Fri Nov 30, 2007 4:06 am

Howdy,

We're having issues taking payments from redirection outside of our walled garden.

I.E.
1. User trials. Likes the service and goes to sign up.
2. Pays via our local payment gateway
3. RE-directs to third party site for confirmation (i.e. http://www.mycardsecure.com)
4. then back to our local payment gateway
5. then confrimed and able to login.

However, at step 3, there are sites not within our walled garden and the whole payment process freezes and I get support calls.

The Question:
how do I get a trial assigned to someone who has already trialed (or reset the trial) so they can make payment using the trial time without getting stuck at step 3?

Thanks in advance.
 
nemecio
newbie
Posts: 29
Joined: Wed Sep 05, 2007 11:57 pm
Location: Q.Roo, Mexico

Re: Free Hotspot user time limitation

Fri Nov 30, 2007 6:36 am

Hello,

You could do two things...

1.- when you get the support call (not if but when) you can figure out what is the address they are trying to reach for step 3 and add it to the walled garden, then they can continue on with the registration and any new user that tries to go to the same place will not have the problem.

2.- To reset the trial you only have to find the MAC of the trying customer and delete from the "users" tab in the hotspot... that will efectively remove the restrictions to that user and they can go in their merry way to pay you for the service and continue to step 4

With procedure 2 though you'd have to do that over and over for every customer that freezes on step 3... whilst with procedure 1 problem is solved for good..

Hope this helps some...
 
onowojemma
Member Candidate
Member Candidate
Posts: 129
Joined: Sun Sep 11, 2005 5:27 pm
Location: Nigeria

Hotspot user time limitation 2 hour per day

Thu Feb 07, 2008 12:30 am

Hello i need some thing like this but in my own case the place a a school e-learning center were the student are only allowed to use only 2hour a day and the system will have to be use by another student, note the PC has the same Mac-address and am using the usermanager. it this possible?
 
User avatar
chimaster
Member Candidate
Member Candidate
Posts: 133
Joined: Tue Feb 07, 2006 8:54 am
Location: Queenstown
Contact:

Re: Free Hotspot user time limitation

Wed Feb 18, 2009 1:03 pm

We're revisiting this.

We did step one. But it wasn't pleasant, 80% of our support calls are people giving us money (or not as the case may be).

Is there a way to implement this from the signup.

I.e.
User connects
Performs a Trial (HA!, how likely is that)
Trial runs out.
Redirected to login Page,
Chooses to signup,
Selects Payment,
Payment Selection tells Hotspot to remove trial User (if Exists) and re-initiate Trial
User Makes Payment.
Trial is logged out and user time run out
Redirected to Login, or auto logged in as part of above...

Thoughts?
 
User avatar
NAB
Trainer
Trainer
Posts: 542
Joined: Tue Feb 10, 2009 4:08 pm
Location: UK
Contact:

Re: Free Hotspot user time limitation

Wed Feb 18, 2009 6:09 pm

We're revisiting this.
I assume that everybody is trying to access the same payment method and so everybody is having the same problem.

Am I right in understanding that there are some sites that cannot be accessed because they are not added to the walled garden? If so, am I correct in understanding that the reason they're not in the walled garden is because you can't work out what they are?

If this is the case, why not put a proxy between you and the payment site and log every site you visit when you make a payment and then add these to the walled garden?

If this is not the case, could you explain exactly what the problem is?

Cheers,

Nick.
 
User avatar
chimaster
Member Candidate
Member Candidate
Posts: 133
Joined: Tue Feb 07, 2006 8:54 am
Location: Queenstown
Contact:

Re: Free Hotspot user time limitation

Wed Feb 18, 2009 8:49 pm

Hi Nick,

Thanks for your comments. Seems like a good idea.

I don't know how it is for the rest of the world, but our payment providers (I can't use Paypal, Netcash, Authorize.net etc.. NZD is not a very well supported currency) provide 3DES, when a credit card is used it goes to the banks (or third party site) for verification, depending on their Bank / Credit card, this could be a number of sites.

We have over 70 Hotspots and they are not centrally managed, so we need to add to every walled garden. We have been collecting a list of sites and adding them in, especially now whilst performing upgrades. But it is still tedious. I will look into your proxy idea also :-)

Cheers
 
Etza
newbie
Posts: 46
Joined: Tue May 31, 2011 10:33 pm

Re: Free Hotspot user time limitation

Thu May 03, 2012 6:53 pm

hi guys
with this is possible tou have 5 group of shared users (trial users) with different limit time ??

http://forum.mikrotik.com/viewtopic.php ... 09#p315309

can any body help me ?
 
Anshul
just joined
Posts: 4
Joined: Thu Aug 20, 2015 11:01 am

Re: Free Hotspot user time limitation

Wed Sep 16, 2015 11:15 am

let say if i configure "Trial uptime time 1d 00:10:00" and "trial uptime reset 30d 00:10:00" what does that means i'm a little confused with this....
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 26912
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia
Contact:

Re: Free Hotspot user time limitation

Wed Sep 16, 2015 12:31 pm

let say if i configure "Trial uptime time 1d 00:10:00" and "trial uptime reset 30d 00:10:00" what does that means i'm a little confused with this....
It means the user can use ten minutes of internet, then will be locked out. After one month, he can use 10 minutes again.
 
PeterDoBrasil
Member Candidate
Member Candidate
Posts: 134
Joined: Sun Aug 23, 2015 6:55 pm

Re: Free Hotspot user time limitation

Sun Sep 20, 2015 9:02 pm

let say if i configure "Trial uptime time 1d 00:10:00" and "trial uptime reset 30d 00:10:00" what does that means i'm a little confused with this....
It means the user can use ten minutes of internet, then will be locked out. After one month, he can use 10 minutes again.
{
:local offset 7
:global today
{
:local date [ /system clock get date ]
:local montharray ( "jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec" )
:local monthdays ( 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 )
:local days [ :pick $date 4 6 ]
:local monthtxt [ :pick $date 0 3 ]
:local year [ :pick $date 7 11 ]
:local months ([ :find $montharray $monthtxt] )
:for nodays from=0 to=$months do={
:set days ( $days + [ :pick $monthdays $nodays ] )
}
:set days ($days + $year * 365)
:set today $days
}
:foreach i in=[/ip hotspot user find where profile=PRIVATE disabled=no] do={
:if ([ :find [ /ip hotspot user get $i comment ] ] = 0 ) do={
:local date [ /ip hotspot user get $i comment ]
:local montharray ( "jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec" )
:local monthdays ( 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 )
:local days [ :pick $date 4 6 ]
:local monthtxt [ :pick $date 0 3 ]
:local year [ :pick $date 7 11 ]
:local months ( [ :find $montharray $monthtxt ] )
:for nodays from=0 to=$months do={
:set days ( $days + [ :pick $monthdays $nodays ] )
}
:set days ($days + $year * 365)
:if ( ($days + $offset) < $today ) do={
:local name [/ip hotspot user get $i name]
:log info "HOTSPOT EXPIRE SCRIPT: Setting Profile=ERROR to Hotspot user $name first logged in $date"
/ip hotspot user set profile=ERROR [/ip hotspot user find comment="$date"]
}
}
}
}


# Now it works #

# EXPIRE USER #
{
:global offset
:global today
:global getprof
{
:local date [ /system clock get date ]
:local montharray ( "jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec" )
:local monthdays ( 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 )
:local days [ :pick $date 4 6 ]
:local monthtxt [ :pick $date 0 3 ]
:local year [ :pick $date 7 11 ]
:local months ([ :find $montharray $monthtxt] )
:for nodays from=0 to=[:tonum $months] do={
:set days ( $days + [ :pick $monthdays $nodays ] )
}
:set days ($days + $year * 365)
:set today $days
}

:foreach i in [ /ip hotspot user find where (comment~"jan" || comment~"feb" || comment~"mar" || comment~"apr" \
|| comment~"may" || comment~"jun" || comment~"jul" || comment~"aug" || comment~"sep" || comment~"oct" \
|| comment~"nov" || comment~"dec" ) ] do={
:if ([/ip hotspot user get $i comment ] != "" ) do={
:local date [/ip hotspot user get $i comment ]
:local montharray ( "jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec" )
:local monthdays ( 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 )
:local days [ :pick $date 4 6 ]
:local monthtxt [ :pick $date 0 3 ]
:local year [ :pick $date 7 11 ]
:local months ( [ :find $montharray $monthtxt ] )
:for nodays from=0 to=[:tonum $months] do={
:set days ( $days + [ :pick $monthdays $nodays ] )
:set getprof [/ip hotspot user get $i profile ]
:if ("$getprof" = "10") do={
:set offset 2
} else={
:if ("$getprof" = "30") do={
:set offset 7
} else={
:if ("$getprof" = "60") do={
:set offset 14
} else={
:if ("$getprof" = "100") do={
:set offset 21
} else={
:if ("$getprof" = "110") do={
:set offset 31
}}}}}}}
:set days ($days + $year * 365)
:if ( ($days + $offset) < $today ) do={
:local name [/ip hotspot user get $i name]
:log error "HOTSPOT EXPIRE SCRIPT: Removing Hotspot user $name Profile -> $getprof Offset is $offset Days first logged in $date"
[/ip hotspot user remove $i ]
}}}}
Last edited by PeterDoBrasil on Sun Jan 24, 2016 11:16 pm, edited 4 times in total.
 
User avatar
_Sheriff_
newbie
Posts: 42
Joined: Fri Mar 30, 2007 12:29 pm
Location: Poland
Contact:

Re: Free Hotspot user time limitation

Sun Jan 24, 2016 10:56 pm

Hello.
I have a similar problem.
It is a hotspot.
I have 100 different logins
1. Each username has to be active up to 1 hour
- Can log on several times but the total time does not exceed 1 hour.
How to do it?
2. Each login can be used only once in 10 days
How to do it?
 
PeterDoBrasil
Member Candidate
Member Candidate
Posts: 134
Joined: Sun Aug 23, 2015 6:55 pm

Re: Free Hotspot user time limitation

Sun Jan 24, 2016 11:06 pm

try this
ip hotspot server profile
enable trial, http-chap
set below
trial-uptime-limit: 01:00:00
trial -uptime-reset: 10d 00:00:00
trial profile: criate your profile and set here

this setup creates temporary users, on login page user click ontrial and can access their 60 min
 
PeterDoBrasil
Member Candidate
Member Candidate
Posts: 134
Joined: Sun Aug 23, 2015 6:55 pm

Re: Free Hotspot user time limitation

Mon Jan 25, 2016 12:35 am

# Hotspot on Login Script #
{
:global name
:global mac
:global date
:global prof
:global action
:foreach i in=[/ip hotspot user find where dynamic=no ] do={
:if ([/ip hotspot user get $i comment ] = "" ) do={
:set name [/ip hotspot user get $i name ];
:set prof [/ip hotspot user get $i profile ];
:if ([/ip hotspot active find where user="$name" ] != "" ) do={
:set date [/system clock get date ];
:set mac [/ip hotspot active get [ find where user="$name" ] mac-address ];
:set action [/ip hotspot user set $i mac-address=$mac comment="$date" ];
:log warning ("New Login User->$name Mac->$mac Profile->$prof");
}}}}


# Other Version #
# Expire Payed User #
{
:global offset
:global today
:global prof

{
:local date [ /system clock get date ]
:local montharray ( "jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec" )
:local monthdays ( 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 )
:local days [ :pick $date 4 6 ]
:local monthtxt [ :pick $date 0 3 ]
:local year [ :pick $date 7 11 ]
:local months ([ :find $montharray $monthtxt] )
:for nodays from=0 to=[:tonum $months] do={
:set days ( $days + [ :pick $monthdays $nodays ] )
}
:set days ($days + $year * 365)
:set today $days
}

:foreach i in [ /ip hotspot user find where dynamic=no (profile=10 || profile=30 || profile=60 \
|| profile=100 || profile=110 ) ] do={
:if ([/ip hotspot user get $i comment ] != "" ) do={
:local date [ /ip hotspot user get $i comment ]
:local montharray ( "jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec" )
:local monthdays ( 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 )
:local days [ :pick $date 4 6 ]
:local monthtxt [ :pick $date 0 3 ]
:local year [ :pick $date 7 11 ]
:local months ( [ :find $montharray $monthtxt ] )
:for nodays from=0 to=[:tonum $months] do={
:set days ( $days + [ :pick $monthdays $nodays ] )
:set prof [/ip hotspot user get $i profile ]
:if ("$prof" = "10") do={
:set offset 2
} else={
:if ("$prof" = "30") do={
:set offset 6
} else={
:if ("$prof" = "60") do={
:set offset 12
} else={
:if ("$prof" = "100") do={
:set offset 20
} else={
:if ("$prof" = "110") do={
:set offset 31
}}}}}}
:set days ($days + $year * 365)
:if ( ($days + $offset) < $today ) do={
:local name [/ip hotspot user get $i name]
:log error ("HOTSPOT EXPIRE SCRIPT: Disabling Hotspot User $name with Profile $prof and Offset $offset first logged in $date")
[ /ip hotspot user disable $i ]
[ /ip hotspot active remove [find where user=$user] ]
}}}}
 
User avatar
_Sheriff_
newbie
Posts: 42
Joined: Fri Mar 30, 2007 12:29 pm
Location: Poland
Contact:

Re: Free Hotspot user time limitation

Mon Jan 25, 2016 10:14 pm

@PeterDoBrasil

You can add any comment to explain?
I do not want to use the trial
Since I have several groups with different logins access time to a hotspot.
1. group trial
- Every 15 minutes kicked
- Speed ​​up to 512K
- A single login shared for all customers
2. The Group 1h
- 100 different logins and passwords
- Access to hotspot for 1h, not once, but the amount (e.g., 15 min + 30 min + 5min + 10 minutes = 60 minutes = 1 hour)
- Once used a login can not be used more times within a few days.
- Speed ​​of up to 2Mb
3. The group 2h
- 100 different logins and passwords
- Access to hotspot for 2h, not once but the amount (e.g., 15 min + 30 min + 5 min + 10 min + 1h = 2h)
- Once used a login can not be used more times within a few days.
- Speed ​​of up to 2Mb
4. The Group 3h
- 100 different logins and passwords
- Access to hotspot for 3h, not once but the amount (e.g., 1 hour + 30 min + 30 min + + 1 h = 3h)
- Once used a login can not be used more times within a few days.
- Speed ​​of up to 2Mb

Do you understand?
 
tejas77
just joined
Posts: 1
Joined: Thu Sep 08, 2016 12:00 pm

Re: Free Hotspot user time limitation

Thu Sep 08, 2016 1:25 pm

Sir can anything be configured withe the help of Microtek Routerboard RB750
My aim is to configure trial net for 10min per mac address per day.
need help
 
FKT
just joined
Posts: 1
Joined: Mon Oct 16, 2017 5:45 pm

Re: One Button Can Access Free Wi-Fi

Mon Oct 16, 2017 6:04 pm

Hi Dear may i have question please. Could u plz show me how to configure hotspot template only one button free Wi-Fi access without username and password. thanks
[img]login[/img][img]popup[/img]

Who is online

Users browsing this forum: rextended and 5 guests