## Block Youtube with "Layer 7" or "Content" Or "TLS" - MikroTik Script RouterOS
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 src-address=192.168.0.0/24 in-interface=bridge out-
interface=ether1 layer7-protocol=Youtube comment="Block YouTube With Layer7-
protocol"
/ip firewall layer7-protocol
add name=Tiktok regexp="^.+(tiktok.com|musical.ly).*\$"
/ip firewall filter
add action=drop chain=forward src-address=192.168.0.0/24 in-interface=bridge out-
interface=ether1 comment="BLOCK TikTok with layer7-protocol=Tiktok"
Block WhatsApp With "Layer-7"
/ip firewall layer7-protocol
add name=WhatsApp regexp="^.+(whatsapp.com).*\$"
/ip firewall filter
add action=drop chain=forward src-address=192.168.0.0/24 in-interface=bridge out-
interface=ether1 layer7-protocol=WhatsApp comment="Block Whatsapp With Layer7-
protocol"
/ip firewall layer7-protocol
add name=Facebook regexp="^.+(facebook.com|fbcdn.net).*\$"
/ip firewall filter
add action=drop chain=forward src-address=192.168.0.0/24 in-interface=bridge out-
interface=ether1 layer7-protocol=Facebook comment="Block Facebook With Layer7-
protocol"
/ip firewall layer7-protocol
add name=Telegram regexp="^.+(bigo.tv).*\$"
/ip firewall filter
add action=drop chain=forward src-address=192.168.0.0/24 in-interface=bridge out-
interface=ether1 layer7-protocol=Telegram comment="Block Telegram With Layer7-
protocol"
/ip firewall layer7-protocol
add name=Instagram regexp="^.+(instagram.com).*\$"
/ip firewall filter
add action=drop chain=forward src-address=192.168.0.0/24 in-interface=bridge out-
interface=ether1 layer7-protocol=Instagram comment="Block Instagram With Layer7-
protocol"
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++
Block Youtube With "Content"
/ip firewall filter
add action=drop chain=forward src-address=192.168.0.0/24 in-interface=bridge out-
interface=ether1 content="youtube.com" comment="Block Youtube With Content"
add action=drop chain=forward src-address=192.168.0.0/24 in-interface=bridge out-
interface=ether1 content="googlevideo.com" comment="Block Youtube With Content"
add action=drop chain=forward src-address=192.168.0.0/24 in-interface=bridge out-
interface=ether1 content=".youtube." comment="Block Youtube With Content"
add action=drop chain=forward src-address=192.168.0.0/24 in-interface=bridge out-
interface=ether1 content=".googlevideo." comment="Block Youtube With Content"
add action=drop chain=forward src-address=192.168.0.0/24 in-interface=bridge out-
interface=ether1 content="bigo.tv" comment="Block Telegram With CONTENT"
add action=drop chain=forward src-address=192.168.0.0/24 in-interface=bridge out-
interface=ether1 content=".bigo." comment="Block Telegram With CONTENT"
add action=drop chain=forward src-address=192.168.0.0/24 in-interface=bridge out-
interface=ether1 content="tiktokv.com" comment="Block TikTok With Content"
add action=drop chain=forward src-address=192.168.0.0/24 in-interface=bridge out-
interface=ether1 content="musical.ly" comment="Block TikTok With Content"
add action=drop chain=forward src-address=192.168.0.0/24 in-interface=bridge out-
interface=ether1 content=".tiktok." comment="Block TikTok With Content"
add action=drop chain=forward src-address=192.168.0.0/24 in-interface=bridge out-
interface=ether1 content="whatsapp.com" comment="Block WhatsApp With Content"
add action=drop chain=forward src-address=192.168.0.0/24 in-interface=bridge out-
interface=ether1 content=".whatsapp." comment="Block WhatsApp With Content"
add action=drop chain=forward src-address=192.168.0.0/24 in-interface=bridge out-
interface=ether1 content="facebook.com" comment="Block Facebook With Content"
add action=drop chain=forward src-address=192.168.0.0/24 in-interface=bridge out-
interface=ether1 content="fbcdn.net" comment="Block Facebook With Content"
add action=drop chain=forward src-address=192.168.0.0/24 in-interface=bridge out-
interface=ether1 content=".facebook." comment="Block Facebook With Content"
add action=drop chain=forward src-address=192.168.0.0/24 in-interface=bridge out-
interface=ether1 content=".fbcdn." comment="Block Facebook With Content"
add action=drop chain=forward src-address=192.168.0.0/24 in-interface=bridge out-
interface=ether1 content="instagram.com" comment="Block Instagram With Content"
add action=drop chain=forward src-address=192.168.0.0/24 in-interface=bridge out-
interface=ether1 content=".Instagram." comment="Block Instagram With Content"
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++
Block Youtube With "TLS"
/ip firewall filter
add action=drop chain=forward src-address=192.168.0.0/24 in-interface=bridge out-
interface=ether1 protocol=tcp tls-host="youtube.com" comment="Block Youtube With
TLS"
add action=drop chain=forward src-address=192.168.0.0/24 in-interface=bridge out-
interface=ether1 protocol=tcp tls-host="googlevideo.com" comment="Block Youtube
With TLS"
add action=drop chain=forward src-address=192.168.0.0/24 in-interface=bridge out-
interface=ether1 protocol=tcp tls-host="*.youtube.*" comment="Block Youtube With
TLS"
add action=drop chain=forward src-address=192.168.0.0/24 in-interface=bridge out-
interface=ether1 protocol=tcp tls-host="*.googlevideo.*" comment="Block Youtube
With TLS"
add action=drop chain=forward src-address=192.168.0.0/24 in-interface=bridge out-
interface=ether1 protocol=tcp tls-host="whatsapp.com" comment="Block WhatsApp With
TLS"
add action=drop chain=forward src-address=192.168.0.0/24 in-interface=bridge out-
interface=ether1 protocol=tcp tls-host="*.whatsapp.*" comment="Block WhatsApp With
TLS"
add action=drop chain=forward src-address=192.168.0.0/24 in-interface=bridge out-
interface=ether1 protocol=tcp tls-host="facebook.com" comment="Block Facebook With
TLS"
add action=drop chain=forward src-address=192.168.0.0/24 in-interface=bridge out-
interface=ether1 protocol=tcp tls-host="fbcdn.net" comment="Block Facebook With
TLS"
add action=drop chain=forward src-address=192.168.0.0/24 in-interface=bridge out-
interface=ether1 protocol=tcp tls-host="*.facebook.*" comment="Block Facebook With
TLS"
add action=drop chain=forward src-address=192.168.0.0/24 in-interface=bridge out-
interface=ether1 protocol=tcp tls-host="*.fbcdn.*" comment="Block Facebook With
TLS"
add action=drop chain=forward src-address=192.168.0.0/24 in-interface=bridge out-
interface=ether1 protocol=tcp tls-host="instagram.com" comment="Block Instagram
With TLS"
add action=drop chain=forward src-address=192.168.0.0/24 in-interface=bridge out-
interface=ether1 protocol=tcp tls-host="*.instagram.*" comment="Block Instagram
With TLS"
add action=drop chain=forward src-address=192.168.0.0/24 in-interface=bridge out-
interface=ether1 protocol=tcp tls-host="bigo.tv" comment="Block Telegram With TLS"
add action=drop chain=forward src-address=192.168.0.0/24 in-interface=bridge out-
interface=ether1 protocol=tcp tls-host="*.bigo.*" comment="Block Telegram With TLS"
add action=drop chain=forward src-address=192.168.0.0/24 in-interface=bridge out-
interface=ether1 protocol=tcp tls-host=*.musical.ly comment="Block TikTok With TLS"
add action=drop chain=forward src-address=192.168.0.0/24 in-interface=bridge out-
interface=ether1 content=tiktokv.com comment="Block TikTok With TLS"
add action=drop chain=forward src-address=192.168.0.0/24 in-interface=bridge out-
interface=ether1 content=musical.ly comment="Block TikTok With TLS"
add action=drop chain=forward src-address=192.168.0.0/24 in-interface=bridge out-
interface=ether1 content=tiktok comment="Block TikTok With TLS"