fbpx

Like an ACL, should it be in an order or can it be random in the MikroTik firewall?

In the MikroTik firewall, as in many other firewall systems, the order of the rules is crucial and not random. Each packet that passes through the firewall is checked against the rules in sequence, starting from the first rule down the list.

As soon as a rule matching the packet is found, the action specified in that rule is taken (allow, block, flag, etc.), and the packet is not compared to subsequent rules. This process is known as the “first match wins” rule.

Importance of the Order of the Rules

  • Security Policy Effectiveness: The order of the rules determines the effectiveness of your security policy. Poorly ordered rules can result in allowing traffic that should be blocked or vice versa.
  • Performance Optimization: Placing the most used rules or those most likely to match the traffic at the beginning can improve firewall performance by reducing the time required to process each packet.
  • Specificity: The more specific rules should come before the more general ones. For example, if you have a rule to block all traffic to a specific server and another rule to allow all traffic to anywhere, the specific blocking rule should go first.

Considerations for the Order of the Rules

  1. Specific Blocking Rules at the Beginning: Place specific rules to block unwanted traffic at the top of your rules list.
  2. Allow Known Traffic: After blocking specifically unwanted traffic, follow up with rules to allow expected and known traffic to and from your critical services.
  3. Wide Capture Rules at the End: Broad capture rules, such as generic rules of allowing or blocking all remaining traffic, should go last.
  4. Using “FastTrack”: If you are using the FastTrack feature (which allows certain traffic to bypass firewall processing to improve performance), be careful with its position as it could bypass important security rules if configured incorrectly.
  5. Registration and Debugging Rules: Rules for logging certain traffic are often placed in strategic positions depending on what traffic you need to monitor, but keep in mind that too much logging can impact performance.

Modify the Order of the Rules

You can change the order of rules in MikroTik RouterOS using WinBox, WebFig, or the command line. In WinBox or WebFig, you can simply drag and drop the rulers to rearrange them. On the command line, you can use the sequence numbers of the rules to move them using commands like move.

Conclusion

The order of the rules in the MikroTik firewall is essential to ensure that your network is protected effectively and that the firewall functions optimally. Careful planning and organization of your firewall rules is essential to maintaining a secure and efficient network.

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