fbpx

Can category blocking be done?

Yes, it is possible to perform category locks on MikroTik devices using several techniques. This type of blocking is useful for managing access to specific types of content on a network, such as social media sites, adult content, online games, among others.

We explain some methods in detail:

1. Layer 7 Protocols (L7)

MikroTik allows the creation of Layer 7 Protocol rules, which are used to identify specific patterns in the network traffic passing through the device.

For example, you can create a filter that detects certain keywords or specific domains associated with a content category, such as “social media” or “streaming.” Once the patterns are identified, you can apply firewall rules that block that traffic.

Create an L7 filter

  1. Access WinBox or SSH terminal of your MikroTik.
  2. Navigate to IP -> Firewall -> Layer7 Protocols.
  3. Create a new rule, adding the desired pattern. For example, to block YouTube, you could use a pattern like: ^.+(youtube.com).*$.
  4. You then use this L7 rule in a firewall rule to block the traffic.

2. Web Proxy

MikroTik also includes a Web Proxy that can be used to block URLs based on keywords. The proxy can be configured to intercept all HTTP traffic and apply filtering rules that block access to certain categories of websites.

Web Proxy Configuration

  1. Enable Web Proxy under IP -> Web Proxy.
  2. Configure the port and IP address of the proxy.
  3. En Access, add rules to block specific URLs or keywords related to the categories you want to block.

3. DNS

A simple way to block websites by category is to manipulate DNS responses so that specific sites are not resolved correctly, or are redirected to a “block” page.

This can be done by using MikroTik's DNS server to intercept DNS queries and respond with specific IP addresses.

Configure DNS blocking

  1. Go to IP -> DNS -> Static.
  2. Add entries for the domains you want to block, redirecting them to an IP address that displays an error page or information about the internet usage policy.

4. MikroTik RouterOS Scripts

For more dynamic and automated management, you can write scripts in RouterOS that apply blocking rules based on updated lists of content categories, and that can adapt to changes or updates to blocked categories.

These techniques can be combined and adjusted according to the specific needs of your network, offering robust control over the type of content that users on your MikroTik network can access.

There are no tags for this post.
Did this content help you?
Facebook
Twitter
LinkedIn
WhatsApp
Telegram

Other documents in this category

Leave your comment

Your email address will not be published. Required fields are marked with *

Tutorials available at MikroLABs

No Courses Found!

DISCOUNT CODE

AN24-LIB

applies to MikroTik books and book packs

Days
Hours
Minutes
Seconds

Introduction to
OSPF - BGP - MPLS

Sign up for this Free course

MAE-RAV-ROS-240118
Days
Hours
Minutes
Seconds

Sign up for this Free course

MAS-ROS-240111

Promo for Three Kings Day!

KINGS24

15%

all the products

MikroTik courses
Academy courses
MikroTik books

Take advantage of the Three Kings Day discount code!

* promotion valid until Sunday January 7, 2024
** the code (KINGS24) applies to shopping cart
*** buy your course now and take it until March 31, 2024

New Year's Eve Promo!

NY24

20%

all the products

MikroTik courses
Academy courses
MikroTik books

Take advantage of the New Year's Eve discount code!

* promotion valid until Monday, January 1, 2024
** the code (NY24) applies to shopping cart
*** buy your course now and take it until March 31, 2024

Christmas discounts!

XMAS23

30%

all the products

MikroTik courses
Academy courses
MikroTik books

Take advantage of the discount code for Christmas!!!

**codes are applied in the shopping cart
Promo valid until Monday December 25, 2023

CYBER WEEK DISCOUNTS

CW23-MK

17%

all MikroTik OnLine courses

CW23-AX

30%

all Academy courses

CW23-LIB

25%

all MikroTik Books and Book Packs

Take advantage of the discount codes for Cyber ​​Week!!!

**codes are applied in the shopping cart
Promo valid until Sunday December 3, 2023

BLACK FRIDAY DISCOUNTS

BF23-MX

22%

all MikroTik OnLine courses

BF23-AX

35%

all Academy courses

BF23-LIB

30%

all MikroTik Books and Book Packs

Take advantage of the discount codes for Black Friday!!!

**Codes are applied in the shopping cart

codes are applied in the shopping cart
valid until Sunday November 26, 2023

Days
Hours
Minutes
Seconds

Sign up for this Free course

MAE-VPN-SET-231115

Halloween promo

Take advantage of discount codes for Halloween.

Codes are applied in the shopping cart

HW23-MK

11% discount on all MikroTik OnLine courses

11%

HW23-AX

30% discount on all Academy courses

30%

HW23-LIB

25% discount on all MikroTik Books and Book Packs

25%

Register and participate in the free course Introduction to Advanced Routing with MikroTik (MAE-RAV-ROS)

Today (Wednesday) October 11, 2023
7pm to 11pm (Colombia, Ecuador, Peru)

MAE-RAV-ROS-231011