Community discussions

MikroTik App
 
oopsxp
just joined
Topic Author
Posts: 4
Joined: Tue Sep 04, 2018 2:53 pm

How can I enable a device to connect wifi for only 2 hours per day without setting hotspot

Sun Sep 23, 2018 9:47 am

as subject. Thanks

Static IP of the device has been set (i.e. 192.168.88.20)
 
UpRunTech
Member Candidate
Member Candidate
Posts: 238
Joined: Fri Jul 27, 2012 12:11 pm

Re: How can I enable a device to connect wifi for only 2 hours per day without setting hotspot

Tue Sep 25, 2018 10:11 pm

as subject. Thanks

Static IP of the device has been set (i.e. 192.168.88.20)
Use Kid Control. It's not very well named as it actually drives them crazy and out of control.

https://wiki.mikrotik.com/wiki/Manual:Kid-control
 
Redmor
Member Candidate
Member Candidate
Posts: 256
Joined: Wed May 31, 2017 7:40 pm
Location: Italy

Re: How can I enable a device to connect wifi for only 2 hours per day without setting hotspot

Wed Sep 26, 2018 4:19 pm

You can use Time under access list rule, never tried it, but should work.
 
User avatar
xvo
Forum Guru
Forum Guru
Posts: 1237
Joined: Sat Mar 03, 2018 1:12 am
Location: Moscow, Russia

Re: How can I enable a device to connect wifi for only 2 hours per day without setting hotspot

Wed Sep 26, 2018 6:31 pm

You can use Time under access list rule, never tried it, but should work.
That won't work.
And the kid control feature as well.
They both can only restrict the hour ranges when the client can stay connect, not the total connected time per day.
 
UpRunTech
Member Candidate
Member Candidate
Posts: 238
Joined: Fri Jul 27, 2012 12:11 pm

Re: How can I enable a device to connect wifi for only 2 hours per day without setting hotspot

Wed Sep 26, 2018 11:43 pm

You can use Time under access list rule, never tried it, but should work.
That won't work.
And the kid control feature as well.
They both can only restrict the hour ranges when the client can stay connect, not the total connected time per day.
True, there was some ambiguity to the question.

Hotspot might be easiest. If you want to only have selected devices use the hotspot you can add their MAC in the access list and force them onto a VLAN+bridge that runs the hotspot without needing to use a new SSID. Otherwise, just make a new SSID with the hotspot on it. Even then I don't know if on hotspot you can lock a device out when it's used up it's allocation for a 24H period. It might need some extra scripting to support this.
 
allstarcomps
newbie
Posts: 36
Joined: Sat Jul 08, 2017 10:36 pm
Location: San Diego, CA, USA
Contact:

Re: How can I enable a device to connect wifi for only 2 hours per day without setting hotspot

Thu Sep 27, 2018 8:56 am

Set DHCP lease time to 24hrs

DHCP lease script add the host IP to a firewall list named "allowedLan" with a 2hr time out.

Firewall filter forward chain accept traffic from the src address list=allowedLan

Firewall filter forward chain drop traffic from the screen address list!=allowedLan
 
UpRunTech
Member Candidate
Member Candidate
Posts: 238
Joined: Fri Jul 27, 2012 12:11 pm

Re: How can I enable a device to connect wifi for only 2 hours per day without setting hotspot

Thu Sep 27, 2018 11:52 pm

Set DHCP lease time to 24hrs

DHCP lease script add the host IP to a firewall list named "allowedLan" with a 2hr time out.

Firewall filter forward chain accept traffic from the src address list=allowedLan

Firewall filter forward chain drop traffic from the screen address list!=allowedLan
This is only good if the requirement is to start the clock from the moment the device is turned on. I think the OP needs to define the problem more succinctly.

Is it:

* 2 hours from device powerup?
* 2 hours of web browsing?
* 2 hours contiguous use?
* 2 hours accumulated over 24h rolling window?
* 2 hour window before kids bedtime?

Given most computing devices are on all the time and sleep and wake and do a DHCP request often the DHCP script might not be the solution.
 
User avatar
Jotne
Forum Guru
Forum Guru
Posts: 3343
Joined: Sat Dec 24, 2016 11:17 am
Location: Magrathean

Re: How can I enable a device to connect wifi for only 2 hours per day without setting hotspot

Sun Sep 30, 2018 10:23 am

The problem I do have with this, is that the kids uses internet on the cell phone if I turn of the Wifi.
Either their own phone or friend phone.
 
kanyck
just joined
Posts: 8
Joined: Sat Oct 17, 2020 10:16 pm

Re: How can I enable a device to connect wifi for only 2 hours per day without setting hotspot

Thu Nov 05, 2020 8:07 pm

I did solved the similar task using the hotspot's trial period. A kid passes the captive portal without logging in and gets his/her trial time. You may change trial time by scripts (i.e. more for days off, less for weekdays). The trial record is removed at night. I don't have this device under my hands now, but I may look for a backup to publish here as a boiler-plate if need be.
However, now I need to couple the hotspot with kid control somehow to allow the kids to be connected by schedule (for the remote learning due to lockdown) plus some free surfing with a restriction of total connection time, as it was done before using a hotspot. At the moment I don't understand how to implement this...

Who is online

Users browsing this forum: No registered users and 10 guests