How to block Youtube and Facebook using Layer 7 Protocol

Block youtube and facebook using layer7 on mikrotik
1- create layer7 to filter out facebook.com and youtube.com

/ip firewall layer7-protocol
add name=youtube7 regexp="^.+(youtube.com).*$"
add name=facebook7 regexp="^.+(facebook.com).*$"

2- create firewall filter rule that match our regex of layer7

/ip firewall filter
add chain=forward action=drop protocol=tcp layer7-protocol=facebook7
add chain=forward action=drop protocol=tcp layer7-protocol=youtube7

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s