Skip to content Skip to sidebar Skip to footer

MikroTik RouterOS Advanced Firewall Configuration Techniques

In the world of networking, Mikrotik is a leading name in the industry. The RouterOS operating system by Mikrotik is one of the most widely used platforms for routing and network management. When you first set up a Mikrotik router, it is important to ensure that the firewall rules are properly set up. This is where the Mikrotik RouterOS factory default firewall rules come in.

Mikrotik RouterOS default firewall rules

The factory default firewall rules are pre-configured rules that are set up by Mikrotik when you first install the RouterOS software. These rules are designed to provide a basic level of security for your network and can be customized or modified as per your specific requirements. In this article, we will discuss the Mikrotik RouterOS factory default firewall rules in detail and explain how they work.

Default Mikrotik RouterOS Firewall Rules

The following are the default firewall rules that are set up by Mikrotik when you first install the RouterOS software:

  • Allow everything from outside
  • Allow related established
  • Drop invalid
  • Drop all from WAN not DSTNATed
  • Accept all from LAN
  • Drop all from WAN to LAN
  • Accept ICMP from anywhere
  • Accept DHCP requests

Let us now look at each of these firewall rules in detail and understand how they work.

Allow everything from outside

This rule allows all traffic from outside into the router. This means that any external entity can connect to the router, including the internet, unless it is explicitly blocked by another rule. This rule is usually the first rule in the firewall and is needed to allow traffic from the WAN interface into the router.

Allow related established

This rule allows all related and established traffic to pass through the router, regardless of the origin of the traffic. This is required for stateful packet inspection, where the router keeps track of the status of the traffic flowing through it. This rule is designed to prevent the router from filtering out the packets that belong to an established connection or a connection that has already been permitted by the firewall.

Drop invalid

This rule drops all packets that are invalid or have incorrect TCP/UDP checksums. Packets with incorrect checksums are dropped as they indicate that the packet has been modified in transit or is corrupt. Dropping invalid packets helps prevent various types of attacks like spoofing, denial-of-service (DDoS), and buffer overflow attacks.

Drop all from WAN not DSTNATed

This rule drops all traffic that is not specifically directed towards the router and is not destined for the router. This rule is designed to prevent unwanted traffic from the internet from reaching your LAN. This rule is typically used on a router that is used for NAT, where you want to block all unwanted traffic from reaching the LAN.

Accept all from LAN

This rule allows all traffic from the LAN interface to reach the internet or the router. This rule is typically used in a router that is acting as a gateway for your LAN. Allowing all traffic from the LAN interface allows all devices on your LAN to communicate with each other and with the outside world.

Drop all from WAN to LAN

This rule drops all traffic that is directed towards the LAN interface from the WAN interface. This rule is designed to prevent all unwanted traffic from the internet to reach your LAN. This rule is typically used on a router that is used for NAT, where you want to block all unwanted traffic from reaching the LAN.

Accept ICMP from anywhere

This rule allows ICMP (Internet Control Message Protocol) traffic from any source to reach the router. ICMP is used to troubleshoot network problems and to help diagnose issues with the network. Allowing ICMP traffic helps you easily diagnose network issues and ensures that your network is running smoothly.

Accept DHCP requests

This rule allows DHCP (Dynamic Host Configuration Protocol) requests to reach the router from any source. DHCP is used to automatically assign IP addresses to devices on your network. Allowing DHCP traffic helps you easily set up and manage your network and ensures that all devices on your network have a valid IP address.

Customizing the Firewall Rules

While the Mikrotik RouterOS factory default firewall rules provide a basic level of security for your network, they may not meet all your specific requirements. You may need to modify or customize these rules to suit your specific needs. To customize the firewall rules, you can either edit the existing rules or add new rules to the firewall using the Winbox application or the command-line interface (CLI).

  • To edit an existing firewall rule, select the firewall rule from the list of rules and click on the "Edit" button. You can modify the firewall rule as per your specific requirements and save the changes.
  • To add a new firewall rule, click on the "Add new" button and enter the details of the new rule. You can select the protocol, source, destination, action, and other parameters for the new rule.

It is recommended that you only modify the default firewall rules if you know what you are doing. Mistakes in modifying the firewall rules can lead to security risks and can cause problems with network connectivity. It is always a good idea to backup the configuration of your router before modifying any settings or rules.

Conclusion

The Mikrotik RouterOS factory default firewall rules provide a basic level of security for your network and ensure that your network is protected against common types of attacks. Understanding these rules and how they work is important for anyone managing a network that uses Mikrotik routers. By customizing these rules to suit your specific requirements, you can ensure that your network is secure and running smoothly. It is always recommended that you keep your router firmware up to date and regularly audit your firewall rules to ensure that your network is secure.

Mikrotik routeros factory default firewall rules - vseralist



Post a Comment for "MikroTik RouterOS Advanced Firewall Configuration Techniques"