BLOCK YOUTUBE Y 2020

how to effectively block youtube, in a way that does not impair performance and blocking and sites linked to google

I do not believe what your are asking is possible with an MT device.
One would need a specialized type device (simliar to what Barracuda systems produce for email spam) or a heavier grade Router that has IDS type paid services on top.

It sounds like you need to deal with human behaviour and incentives or dis-incentives to manage the issues. :slight_smile:

The blocking is possible if you do not use Google’s DNS. The no impact isn’t.

http://forum.mikrotik.com/t/why-not-a-definitive-solution-to-block-youtube/143255/1

L7 regex used: ^.+(youtube|akamaihd|googlevideo).*$

Try using this method

/ip firewall mangle
add action=add-dst-to-address-list address-list="ip-youtube" \
    address-list-timeout=3m chain=prerouting comment=Youtube content=\
    googlevideo.com in-interface=!e1-internet
add action=mark-connection chain=prerouting dst-address-list="ip-youtube" \
    in-interface=!e1-internet new-connection-mark=Youtube passthrough=yes
add action=mark-packet chain=forward comment="Youtube DOWNLOAD" \
    connection-mark=Youtube in-interface=e1-internet new-packet-mark=\
    "yt-download" passthrough=yes
add action=mark-packet chain=forward comment="Youtube UPLUAD" \
    connection-mark=Youtube new-packet-mark="yt-upload" \
    out-interface=e1-internet passthrough=yes
/queue tree
add name="Youtube DOWNLOAD" packet-mark="yt-download" parent="All Download Traffic" queue=pcq-download-default
add name="Youtube UPLOAD" packet-mark="yt-upload" parent="All Upload Traffic" queue=pcq-upload-default

I’m using this on my routerboard with ROS v4.46.8, that script using add-dst-to-address-list feature with tagging googlevideo.com as source content to ip, then add those ip to address list named ip-youtube.

after that, limit it using tree queue, with marked packet name yt-download and yt-upload