Network rules are applied at the packet level on a Decoder and are made up of rule sets from Layer 2, Layer 3, and Layer 4. Multiple rules can be applied at the packet level to a Decoder. Network rules can apply to multiple network layers (for example, when a network rule filters out specific ports for a specific IP address). Network rules do not apply to Log Decoders, they apply only to Network Decoders.
You can create and manage network rules in the Services Config view > Network Rules tab.
The following table describes the meta keys that NetWitness Platform supports for use in network rule conditions.
The following are sample network rules.
To truncate all SSL from the source port, create a rule as follows:
- Rule Name: Truncate SSL
- Condition: tcp.srcport=443
- Rule Action: Truncate
To filter subnet traffic, create a rule as follows:
- Rule Name: Subnet Filter
- Condition: ip.addr=192.168.2.0/24
- Rule Action: Filter
Meta entities, which provide a way to work with several meta keys at the same time, can be used in application rules, but are not supported in network rules as the metadata available are too limited. For more information on meta entities, see the Core Database Tuning Guide.
To add or edit a network rule:
- Select the Network Rules tab.
The Network Rules tab is displayed.
- In the Network Rules tab, do one of the following:
- If adding a new rule, click .
- If editing a rule, select the rule from the rules list and click .
The Rule Editor dialog is displayed.
- In the Rule Name field, provide a name for the rule. For example, for a rule that truncates all SSL from the source port, type SSL Truncate.
- In the Condition field, build the rule condition that triggers an action when matched. You can type directly in the field or build the condition in this field using meta values from the window actions. As you build the rule definition, NetWitness Platform displays syntax errors and warnings. For example, to truncate all SSL from the source port, tcp.srcport=443.
All string literals and time stamps must be quoted. Do not quote number values and IP addresses. Configure Decoder Rules provides additional details. Supported Meta Keys in Network Rule Conditions describes the meta keys that NetWitness Platform supports for use in network rule conditions.
- If you want rule evaluation to end with this rule, select the Stop Rule Processing checkbox.
- In the Session Data section, choose one of the following actions to apply when a matching packet is found:
- Keep: The packet payload and associated metadata are saved when they match the rule.
- Filter: The packet is not saved when it matches the rule.
- Truncate: The packet payload is not saved when it matches the rule, but packet headers and associated metadata are retained.
- In the Session Options section, select all options that apply of these four.
- Assemble: The assembler assembles the packet chain when it matches the rule.
- Network Meta: The packet generates network metadata when it matches the rule.
- Application Meta: The packet generates application metadata when it matches the rule.
- Alert: The packet generates a custom alert when metadata matches the rule.
- To save the rule and add it to the rules list, click OK.
The rule is added at the end of the list or inserted where you specified in the context menu.
- Check that the rule is in the correct execution sequence with other rules in the list. If necessary, move the rule.
- To apply the updated rule set to the Decoder, click Apply.
NetWitness Platform saves a snapshot of the currently applied rules, then applies the updated set to the Decoder and removes the pending indicator from the rules that were pending.