Manual:Kid-control: Difference between revisions

From MikroTik Wiki
Jump to navigation Jump to search
Line 96: Line 96:


With following example we will restrict access for Peters mobile phone:
With following example we will restrict access for Peters mobile phone:
* Disabled internet access on Monday,Tuesday,Wednesday and Friday
* Disabled internet access on Monday,Wednesday and Friday
* Allowed unlimited internet access on:
* Allowed unlimited internet access on:
** Tuesday
** Thursday from 11:00-22:00
** Thursday from 11:00-22:00
** Sunday 15:00-22:00
** Sunday 15:00-22:00
Line 103: Line 104:


<pre>
<pre>
[admin@MikroTik] > /ip kid-control add name=Peter mon="" tue="" wed="" tur-thu="11:00-22:00" fri="" sat="18:30-22:00" tur-sun="15h-21h" rate-limit=3M
[admin@MikroTik] > /ip kid-control add name=Peter mon="" tur-tue="00:00-24h" wed="" tur-thu="11:00-22:00" fri="" sat="18:30-22:00" tur-sun="15h-21h" rate-limit=3M
[admin@MikroTik] > /ip kid-control device add name=Mobile-phone user=Peter mac-address=FF:FF:FF:ED:83:63
[admin@MikroTik] > /ip kid-control device add name=Mobile-phone user=Peter mac-address=FF:FF:FF:ED:83:63
</pre>
</pre>

Revision as of 12:53, 1 October 2018

Applies to RouterOS: 6.41

Summary

"Kid control" is a parental control feature to limit internet connectivity for LAN devices.

Kid Control

Sub-menu: /ip kid-control


In this menu it is possible to create a profile for each Kid and restrict internet accessibility.


Property Description
name (string) Name of the Kids profile
mon,tue,wed,thu,fri,sat,sun (time) Each day of week. Time of day is selected, when internet access should be allowed
disabled (yes | no) Whether restrictions is enabled
rate-limit (string) Limit allowed amount of traffic
tur-mon,tur-tue,tur-wed,tur-thu,tur-fri,tur-sat,tur-sun (time) Time unlimited rate. Time of day is selected, when internet access should be unlimited


Time unlimited rate parameters have higher priority than rate-limit parameter.

Devices

Sub-menu: /ip kid-control device


This sub-menu contains information if there is multiple connected devices to internet (phone, tablet, gaming console, tv etc.). Device is identified by MAC address that is retrieved from the ARP table. The appropriate IP address is taken from there. It is possible to assign whole subnet to kids devices using netmask.


Property Description
name (string) Name of the device
mac-address (string) Devices mac-address
user (string) To which profile append the device
reset-counters ([id, name]) Reset bytes-up and bytes-down counters.

Example

With following example we will restrict access for Peters mobile phone:

  • Disabled internet access on Monday,Wednesday and Friday
  • Allowed unlimited internet access on:
    • Tuesday
    • Thursday from 11:00-22:00
    • Sunday 15:00-22:00
  • Limited bandwidth to 3Mbps for Peters mobile phone on Saturday from 18:30-21:00
[admin@MikroTik] > /ip kid-control add name=Peter mon="" tur-tue="00:00-24h" wed="" tur-thu="11:00-22:00" fri="" sat="18:30-22:00" tur-sun="15h-21h" rate-limit=3M
[admin@MikroTik] > /ip kid-control device add name=Mobile-phone user=Peter mac-address=FF:FF:FF:ED:83:63


Internet access limitation is implemented by adding dynamic firewall filter rules or simple queue rules. Here are example firewall filter rules:

[admin@MikroTik] > /ip firewall filter print

1  D ;;; Mobile-phone, kid-control
      chain=forward action=reject src-address=192.168.88.254 

2  D ;;; Mobile-phone, kid-control
      chain=forward action=reject dst-address=192.168.88.254

Dynamically created simple queue:

[admin@MikroTik] > /queue simple print
Flags: X - disabled, I - invalid, D - dynamic 

 1  D ;;; Mobile-phone, kid-control
      name="queue1" target=192.168.88.254/32 parent=none packet-marks="" priority=8/8 queue=default-small/default-small limit-at=3M/3M max-limit=3M/3M burst-limit=0/0 
      burst-threshold=0/0 burst-time=0s/0s bucket-size=0.1/0.1 

It is possible to monitor how much data use specific device:

[admin@MikroTik] > /ip kid-control device print stats

Flags: X - disabled, D - dynamic, B - blocked, L - limited, I - inactive 
 #    NAME                                                                                                                 IDLE-TIME    RATE-DOWN   RATE-UP   BYTES-DOWN     BYTES-UP
 1 BI Mobile-phone                                                                                                               30s         0bps      0bps    3438.1KiB       8.9KiB


It is also possible to pause all restrictions and then resume them whenever you want it:

[admin@MikroTik] > /ip kid-control pause Peter 
[admin@MikroTik] > /ip kid-control print
Flags: X - disabled, P - paused, B - blocked, L - rate-limited 
 #   NAME                                                                                                                    SUN      MON      TUE      WED      THU      FRI      SAT     
 0 PB Peter                                                                                                                 15h-21h                             11h-22h          18:30h-22h