Bug #9498 ยป 0001-tests-firewall-counters-for-packets-dropped-by-the-engine.patch
| tests/firewall/firewall-stats-midstream-policy-no-accept/firewall.rules | ||
|---|---|---|
|
# Matches none of the traffic in the pcap: all of it falls to the default
|
||
|
# packet policy (drop).
|
||
|
accept:packet udp:all any any -> any 9 (sid:1;)
|
||
| tests/firewall/firewall-stats-midstream-policy-no-accept/test.yaml | ||
|---|---|---|
|
# The firewall ruleset accepts none of the traffic in the pcap. The midstream
|
||
|
# exception policy drops the flow before the firewall rules are evaluated, so
|
||
|
# its packets are neither accepted by the firewall nor blocked by IPS rules.
|
||
|
requires:
|
||
|
min-version: 8.0.6
|
||
|
pcap: ../tcp-session-midstream-policy/input.pcap
|
||
|
args:
|
||
|
- --simulate-ips
|
||
|
- -k none
|
||
|
- --set stream.midstream-policy=drop-flow
|
||
|
checks:
|
||
|
# The midstream policy dropped the flow.
|
||
|
- filter:
|
||
|
count: 1
|
||
|
match:
|
||
|
event_type: stats
|
||
|
stats.exception_policy.tcp.midstream.drop_flow: 1
|
||
|
- filter:
|
||
|
count: 1
|
||
|
match:
|
||
|
event_type: stats
|
||
|
stats.firewall.accepted: 0
|
||
|
- filter:
|
||
|
count: 1
|
||
|
match:
|
||
|
event_type: stats
|
||
|
stats.ips.blocked: 0
|
||
| tests/firewall/firewall-stats-stream-error-no-accept/firewall.rules | ||
|---|---|---|
|
# Matches none of the traffic in the pcap: all of it falls to the default
|
||
|
# packet policy (drop).
|
||
|
accept:packet udp:all any any -> any 9 (sid:1;)
|
||
| tests/firewall/firewall-stats-stream-error-no-accept/test.yaml | ||
|---|---|---|
|
# The firewall ruleset accepts none of the traffic in the pcap. The stream
|
||
|
# engine drops the third packet (wrong sequence number in the 3-way handshake)
|
||
|
# before the firewall rules are evaluated, so this packet is neither accepted
|
||
|
# by the firewall nor blocked by IPS rules.
|
||
|
requires:
|
||
|
min-version: 8.0.6
|
||
|
pcap: ../tcp-session-stream-out-of-window/input.pcap
|
||
|
args:
|
||
|
- --simulate-ips
|
||
|
- -k none
|
||
|
checks:
|
||
|
# The stream engine dropped one packet.
|
||
|
- filter:
|
||
|
count: 1
|
||
|
match:
|
||
|
event_type: stats
|
||
|
stats.ips.drop_reason.stream_error: 1
|
||
|
- filter:
|
||
|
count: 1
|
||
|
match:
|
||
|
event_type: stats
|
||
|
stats.firewall.accepted: 0
|
||
|
- filter:
|
||
|
count: 1
|
||
|
match:
|
||
|
event_type: stats
|
||
|
stats.ips.blocked: 0
|
||