How to create mangle rules on Mikrotik

Mangle! One of the most dreaded topics in Mikrotik. People get chills at the mention of this topic. But frankly speaking, I see no reason for that. I can however understand the fear because I was once like them.
Today I am going to show you how easy it is to configure a mangle rule. These mangle rules are powerful tools in the hands of network engineers because they go on to use them( mangle rules) to enforce several policies on the router. You can control user traffics and downloads as well as prioritize traffics, using mangle rules.

(adsbygoogle = window.adsbygoogle || []).push({});

Here, I will show you how to mark packets using mangle rules. These marked packets are used when setting up queues for bandwidth managements or when prioritizing packets.
Just look at the images below and follow the steps.

In the first image, click on ip,firewall,mangle, click on the plus sign. The chain should be prerouting. We can match based on source or destination IP, protocol, in or out interfaces,etc. For this example, I am using the in interface. If we want to mark HTTP packets, we set the protocol to tcp and set the destination port to 80. Under the action tab, select mark connection and click on apply and ok.
Next we click on the plus sign again, under the mangle tab,the chain is prerouting,under connection mark,choose the connection mark you created earlier, mine was named “óur-conn”, click on the action tab and choose mark packet. Give it a name, and click on .apply and ok.
You can create as many packet marks as you want using these steps. These packets are used for further policy enforcement on the router.

Spread the love

Leave a Comment