Manual:Kid-control: Difference between revisions

From MikroTik Wiki
Jump to navigation Jump to search
 
(8 intermediate revisions by the same user not shown)
Line 43: Line 43:
|arg=rate-limit
|arg=rate-limit
|type=string
|type=string
|desc=Limit allowed amount of traffic
|desc=Maximum available data rate for flow
}}
}}


{{Mr-arg-ro-table-end
{{Mr-arg-ro-table-end
|arg=time-rate-limited
|arg=tur-mon,tur-tue,tur-wed,tur-thu,tur-fri,tur-sat,tur-sun
|type=time
|type=time
|desc=How long to limit allowed amount of traffic
|desc=Time unlimited rate. Time of day is selected, when internet access should be unlimited
}}
}}
Time unlimited rate parameters have higher priority than <var>rate-limit</var> parameter.


==Devices==
==Devices==
Line 58: Line 61:




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.  
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.




Line 64: Line 67:
|prop=Property
|prop=Property
|desc=Description
|desc=Description
}}
{{Mr-arg-ro-table
|arg=name
|type=string
|desc=Name of the device
}}
}}


Line 72: Line 81:
}}
}}


{{Mr-arg-ro-table-end
{{Mr-arg-ro-table
|arg=user
|arg=user
|type=string
|type=string
|desc=To which profile to add the device
|desc=To which profile append the device
}}
 
{{Mr-arg-ro-table-end
|arg=reset-counters
|type=[id, name]
|desc=Reset bytes-up and bytes-down counters.
}}
}}


==Examples==
==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


<pre>
<pre>
[admin@MikroTik] > /ip kid-control add name=kid1 sun=20:00:00-22:00:00 mon=16:00:00-21:00: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=Limit1 user=kid1 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>


Internet access limitation is implemented by adding dynamic firewall filter rules or simple queue rules. Here are example firewall filter rules:
Internet access limitation is implemented by adding dynamic firewall filter rules or simple queue rules. Here are example firewall filter rules:
Line 90: Line 114:
[admin@MikroTik] > /ip firewall filter print
[admin@MikroTik] > /ip firewall filter print


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


2  D ;;; Limit1, kid-control
2  D ;;; Mobile-phone, kid-control
       chain=forward action=reject dst-address=192.168.88.254
       chain=forward action=reject dst-address=192.168.88.254
</pre>
Dynamically created simple queue:
<pre>
[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
</pre>
It is possible to monitor how much data use specific device:
<pre>
[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
</pre>
It is also possible to <b><span style="color:purple">pause</span></b> all restrictions and then <b><span style="color:purple">resume</span></b> them whenever you want it:
<pre>
[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
</pre>
</pre>


[[Category:Manual|First time]]
[[Category:Manual|First time]]
[[Category:Basic|First time]]
[[Category:Basic|First time]]

Latest revision as of 11:17, 11 March 2020

Version.png

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) Maximum available data rate for flow
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.


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