Is there a way to block a hotspot user based on time? Like weekly from 2am to 10am every monday?
You cannot do it with builtin hotspot or with user manager. You have to create a script and schedule it to disable the user account on Monday 2am and then another script which will enable the account on 10am. Something like following…
Script-1 to disable user test
Script-2 to disable user test
/system script
add name=script1 policy=ftp,reboot,read,write,policy,test,winbox,password,sniff,sensitive,api source="/ip hotspot user disable test"
add name=script2 policy=ftp,reboot,read,write,policy,test,winbox,password,sniff,sensitive,api source="/ip hotspot user enable test"
Now Schedule it like.
/system scheduler
add disabled=no interval=1w name=disable-test-user on-event="/ip hotspot user disable test\r\
\n" policy=ftp,reboot,read,write,policy,test,winbox,password,sniff,sensitive,api start-date=dec/01/2014 start-time=02:00:00
add disabled=no interval=1w name=enable-test-user on-event="/ip hotspot user enable test\r\
\n" policy=ftp,reboot,read,write,policy,test,winbox,password,sniff,sensitive,api start-date=dec/01/2014 start-time=10:00:00
Don’t forget to change the Date according to your need. ![]()
HTH,
Thank you for that.
What if I want to suspend users authenticating through external radius on a particular period of a week? Like no internet access from 2 am to 10 am of Monday weekly?