Free Hotspot user time limitation

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?
  1. Each login can be used only once in 10 days
    How to do it?

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

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] ]
}}}}

@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?

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

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