AT-WR4500 Series - IEEE 802.11abgh Outdoor Wireless Routers

199

RouterOS v3 Configuration and User Guide

 

 

 

RouterOS has very powerful firewall implementation with features including:

stateful packet filtering

peer-to-peer protocols filtering

traffic classification by:

source MAC address

IP addresses (network or list) and address types (broadcast, local, multicast, unicast) port or port range

IP protocols

protocol options (ICMP type and code fields, TCP flags, IP options and MSS) interface the packet arrived from or left through

internal flow and connection marks ToS (DSCP) byte

packet content

rate at which packets arrive and sequence numbers packet size

packet arrival time and much more!

General Filtering Principles

The firewall operates by means of firewall rules. A rule is a definitive form expression that tells the router what to do with a particular IP packet. Each rule consists of two parts that are the matcher which matches traffic flow against given conditions and the action which defines what to do with the mathched packets. Rules are organized in chains for better management.

The filter facility has three default chains: input, forward and output that are responsible for traffic coming from, throurh and to the router, respectively. New user-defined chains can be added, as necessary. Since these chains have no default traffic to match, rules with action=jump and relevant jump-targetshould be added to one or more of the three default chains.

Filter Chains

As mentioned before, the firewall filtering rules are grouped together in chains. It allows a packet to be matched against one common criterion in one chain, and then passed over for processing against some other common criteria to another chain. For example a packet should be matched against the IP address:port pair. Of course, it could be achieved by adding as many rules with IP address:port match as required to the forward chain, but a better way could be to add one rule that matches traffic from a particular IP address, e.g.: /ip firewall filter add src-address=1.1.1.2/32jump-target="mychain"and in case of successfull match passes control over the IP packet to some other chain, id est mychain in this example. Then rules that perform matching against separate ports can be added to mychain chain without specifying the IP addresses.

There are three predefined chains, which cannot be deleted:

input - used to process packets entering the router through one of the interfaces with the destination IP address which is one of the router's addresses. Packets passing through the router are not processed against the rules of the input chain

forward - used to process packets passing through the router

output - used to process packets originated from the router and leaving it through one of the interfaces. Packets passing through the router are not processed against the rules of the output chain

When processing a chain, rules are taken from the chain in the order they are listed there from top to bottom. If a packet matches the criteria of the rule, then the specified action is performed on it, and no more rules are processed in that chain (the exception is the passthrough action). If a packet has not matched any rule within the chain, then it is accepted.

Page 199
Image 199
Allied Telesis AT-WR4500 manual