Advance

MikroTik Firewall

MikroTik Firewall

MikroTik Firewall; A MikroTik firewall is one of the most widely used parts of this router. Although this firewall is not perfect, you can use it extensively to protect your router.

Like most routers, MikroTik is equipped with a firewall. Since the MikroTik company, like the major network equipment vendors, does not have a standalone network firewall, it makes the firewall inside its router a little more equipped.

Although this firewall can by no means replace a UTM or hardware firewall, it can be used in projects where cost is essential.

If you have a large number of firewall rolls or you are extensively using a layer 7 firewall, be very careful in choosing the right board router so that your router’s service quality is not compromised.

To access the MikroTik firewall from the left menu, first, select IP and then Firewall. In the pop-up window, go to the filter role tab.

mikrotik-firewall-eldernode-1

mikrotik-firewall-eldernode-2

Chain Definition in MikroTik Firewall:

By default, the MikroTik firewall has three chains.

  1. Input chain: This packet is in the Input chain when the destination of a packet is the router itself. Like when you use MikroTik as a DNS server, DNS packets are in the input chain.
  2. Output chain: packets whose source address is the router itself. Like the NTP packet that the router sends to the Internet to set its clock.
  3. Forward chain: Packets that are intended to pass through the router. Such as when the router only routes packets and the source, and destination addresses of the packets are not any of the router board addresses.
Recommended Article: How to Configure IP settings in MikroTik

 

It’s easy to add a new roll to the MikroTik.

Click on the add sign and go to the General tab. Then select the chain you want. Fill in the fields depending on the scenario. Note that leaving any field blank means that the field is unimportant.

Then go to the Action tab and select the type of firewall function with the package that fits this role.

mikrotik-firewall-eldernode-3

mikrotik-firewall-eldernode-4

Three important MikroTik actions are as follows:

  1. Accept: This function allows packet passage.
  2. Drop: This operation discards the packet and does not send the result to the sender.
  3. Reject: This operation discards the packet and reports the result to the sender.

For better firewall performance, be sure to put these three rolls in a high priority firewall. Otherwise, some rolls may not work properly.

To apply these rolls, just copy the following commands into the MikroTik terminal:

/ip firewall filter

a) add chain=forward connection-state=established comment=”allow established connections”

b) add chain=forward connection-state=related comment=”allow related connections”

c) add chain=forward connection-state=invalid action=drop comment=”drop invalid connections”

mikrotik-firewall-eldernode-5

Goodluck.

We Are Waiting for your valuable comments and you can be sure that it will be answered in the shortest possible time.

Leave Your Comment

Your email address will not be published.

We are by your side every step of the way

Think about developing your online business; We will protect it compassionately

We are by your side every step of the way

+18054214518

7 days a week, 24 hours a day