When using the Firewall on a TransPort router, is often needed to check if the expected traffic is matching the configured rules.
This article will give the steps in order to do this analysis, basing on the details level/action you need to achieve
I only need to see if the rule is matched by some packet
You can check if a specific rule is matched simply browsing to Configuration - Security > Firewall and check the value "Hits" on the line of the rule you want to check. You can also reset all the Hits values clicking on "Reset Hit Counters". Also, every time you modify a rule, his Hit counter is automatically reset:
![User-added image](https://818164.app.netsuite.com/core/media/media.nl?id=464291&c=818164&h=48fd0d2c293ac45a1ea6)
I need to see which packets are matching the rule
Is the Hits counter is not enough for your purpose, you can then check WHICH traffic is matching the rule, adding the "log" keyword to the rule:
![User-added image](https://818164.app.netsuite.com/core/media/media.nl?id=464259&c=818164&h=e6fee3a31fb84410a249)
When the log option is specified, the unit will place an entry in the FWLOG.TXT file each time it processes a packet that matches the rule. The FW log trace can be checked going to Management - Network Status > Firewall Trace.
Every log will normally detail the rule that was matched along with a summary of the packet contents:
![User-added image](https://818164.app.netsuite.com/core/media/media.nl?id=464201&c=818164&h=f1042b6c54faf829a63b)
I need to see which packet are matching the rule checking also the body content of them
If you need more info about the packet that match the rule, you can insert also the "body" option after the "log":
![User-added image](https://818164.app.netsuite.com/core/media/media.nl?id=464226&c=818164&h=e80ae47c540d6ccd636f)
In that case, the complete IP packet is entered into the log file so that when the log file is displayed, a more detailed decode of the IP packet is shown. The FW log trace can be checked going to Management - Network Status > Firewall Trace:
![User-added image](https://818164.app.netsuite.com/core/media/media.nl?id=464121&c=818164&h=d699f804707e054ba654)
I need to see when the rule is matched relating to other events occurring
In order to do this, the "event" needs to be specified in the rule:
![User-added image](https://818164.app.netsuite.com/core/media/media.nl?id=464194&c=818164&h=62e54e0536e8969a12e8)
With that configuration, the log output will be copied to the EVENTLOG.TXT pseudo-file as well as the FWLOG.TXT file.
The event log entry will contain the line number and hit count for the rule that caused the packet to be logged.
It is very useful in many cases, in the example below is used to easy check that traffic is sent to the primary/backup link in failover scenario.
You can check the eventlog browsing to Management - Event Log:
![User-added image](https://818164.app.netsuite.com/core/media/media.nl?id=464163&c=818164&h=6bd91b0fb163dca47106)
I need to generate an SNMP trap for every packet matching the rule
In order to have an SNMP trap generated when a packet matches the rule, you have to insert the sub-option "snmp" after the "log" field. If the body option has also been specified, some of the IP packet information is also included
![User-added image](https://818164.app.netsuite.com/core/media/media.nl?id=464261&c=818164&h=fa622058e8d31062b3e0)
The SNMP trap will contain similar information to the normal log entry.
I need to send a Syslog Message for every packet matching the rule
In order to have a syslog message sent to the configured syslog manager IP address when a packet matches the rule, you have to insert the sub-option "syslog" after the "log" field. If the body option has also been specified, some of the IP packet information is also included.
![User-added image](https://818164.app.netsuite.com/core/media/media.nl?id=464310&c=818164&h=e80ba769d4eadbe8b656)
This message will contain the same information as that entered into the log file, but in a different format. For example using Tftp64 Syslog server software you can see:
![User-added image](https://818164.app.netsuite.com/core/media/media.nl?id=464214&c=818164&h=8e396bd7dec24194c214)
Note that the size of the syslog message is limited to the maximum of 1024 bytes. The syslog message is sent with default priority value of 14, which expands out to facility of USER, and priority INFO.
Last updated:
Jan 08, 2024