Block Youtube with "Layer 7" or "Content" Or "TLS" - MikroTik Script RouterOS

How to Block Youtube with "Layer 7" or "Content" Or "TLS"

Block Youtube With "Layer-7"

/ip firewall layer7-protocol
add name=Youtube regexp="^.+(youtube.com|googlevideo.com).*\$"
/ip firewall filter
add action=drop chain=forward layer7-protocol=Youtube

Block Youtube With "Content"

/ip firewall filter
add action=drop chain=forward content="youtube.com" 
add action=drop chain=forward content="googlevideo.com"
add action=drop chain=forward content=".youtube."
add action=drop chain=forward content=".googlevideo."

Block Youtube With "TLS"

/ip firewall filter
add action=drop chain=forward protocol=tcp tls-host="youtube.com"
add action=drop chain=forward protocol=tcp tls-host="googlevideo.com"
add action=drop chain=forward protocol=tcp tls-host="*.youtube.*"
add action=drop chain=forward protocol=tcp tls-host="*.googlevideo.*"
Credit: www.o-om.com