How to block websites on MikroTik using Layer 7 protocol

How to block the Mikrotik layer 7 protocol page

How to block websites on MikroTik using Layer 7 protocol – There are many ways to block websites with MikroTik and one of the most common methods is the Layer 7 protocol firewall feature. This feature is actually effective in blocking both http and https sites.

On this occasion I will be sharing a tutorial on how to block sites on MikroTik using this Layer7 protocol. This time, I’ll try to block websites that are often used to block experiments with the MikroTik router board, namely youtube.com and bsnp-indonesia.org.

Also Read: 5 Methods To Block Sites On The MikroTik Web Proxy, Filter Rule, Content

The Layer 7 Protocol itself is a filter method for data packets that are on ICMP, TCP and UDP lines. Layer 7 Protocol is a firewall function that is more complex than other functions. The services included in Layer 7 are HTTP, SNTP, FTP and others.

How to block websites on MikroTik Layer 7 protocol

How to block YouTube sites on MikroTik using Layer 7 protocol which can be applied to MikroTik RB941, RB750 and VirtualBox router board through Winbox application.

Before you block Youtube or BSNP Indonesia website, make sure that the website can be viewed normally and without any problems.

1. Please select the menu first IPFirewall → after calling up the firewall menu, please select the tab Layer7 protocol. Then select menu Add (+).

How to block the Mikrotik layer 7 protocol page

2. Next, you will see the Firewall L7 Protocol tab. Please enter the name as desired, here I fill it in with YouTube and in the Regexp the content of the website domain, which is blocked with Layer 7 script ^. + (domain.com). * $ and here Youtube is blocked and then filled in with:

^.+(youtube.com).*$

You can also block files on MikroTik using the Layer7 protocol. Here is an example of writing a regexp to block mp3 and mkv extension files on MikroTik.

.(mp3)
.(mkv)
How to block the Mikrotik layer 7 protocol page

3rd After that select the tab Filter rules and click Add (+). Choose chain Forward because it blocks data through MikroTik. On In. Interface, please select which ether should block the site, here I will choose Ether 2, then the other ether can still access the site smoothly.

If you want to block websites on all ethers, leave the In option blank. The interface.

How to block the Mikrotik layer 7 protocol page

4th Turn on tab Progressive Please select the page to be blocked in the menu Layer7 protocol namely YouTube.

How to block the Mikrotik layer 7 protocol page

5. Finally, click the tab plot then select option drops in the Actions menu. Then click OK.

How to block the Mikrotik layer 7 protocol page

Complete …. Check websites that have been blocked with Layer 7 protocol which is youtube.com and the results will look like this

How to block the Mikrotik layer 7 protocol page

The last word…

This is the tutorial on how to block websites on MikroTik using Layer 7 Protocol which has been found to be effective in blocking various websites. If there are steps that are not clear please comment below … That’s all for this article and hopefully it will be useful.

Leave a Reply

Your email address will not be published.