Feature #7705
openfirewall: allow single rule to accept protocol detection in progress and the final protocol
Description
Currently 2 rules are needed to accept packet rules that enforce that a protocol is running on a port.
e.g.
# allow all packets while protocol detection is running accept:hook tcp:all any any <> any 22 (app-layer-protocol:unknown; alert; sid:1000;) # then when detected a protocol, only allow ssh accept:hook tcp:all any any <> any 22 (app-layer-protocol:ssh; alert; sid:1001;)
It would be good to be able to express this in a single rule.
e.g. something like:
accept:hook tcp:all any any <> any 22 (app-layer-protocol:unknown,ssh; alert; sid:1000;)
VJ Updated by Victor Julien over 1 year ago
- Related to Feature #7704: firewall: allow single packet rule to accept tcp connection added
VJ Updated by Victor Julien about 1 year ago
- Blocks Story #7583: 9.0.0: usecase: improve firewall usecase added
YD Updated by Yash Datre about 2 months ago
Created the PR: https://github.com/OISF/suricata/pull/15727
PA Updated by Philippe Antoine about 2 months ago
- Status changed from Feedback to In Review
- Target version changed from TBD to 9.0.0-beta1
LS Updated by Lukas Sismis about 1 month ago
VJ Updated by Victor Julien about 1 month ago
- Assignee changed from Victor Julien to Yash Datre
VJ Updated by Victor Julien about 1 month ago
- Status changed from In Review to Resolved
- Label Needs backport to 8.0 added
OT Updated by OISF Ticketbot about 1 month ago
- Subtask #8729 added
OT Updated by OISF Ticketbot about 1 month ago
- Label deleted (
Needs backport to 8.0)
JI Updated by Jason Ish about 1 month ago
For reference, a list of tests showing example usage:
- https://github.com/OISF/suricata-verify/tree/master/tests/app-layer-protocol-engine-analysis
- https://github.com/OISF/suricata-verify/tree/master/tests/app-layer-protocol-list-prefilter-invalid
- https://github.com/OISF/suricata-verify/tree/master/tests/app-layer-protocol-negated-duplicate-invalid
- https://github.com/OISF/suricata-verify/tree/master/tests/app-layer-protocol-exact
- https://github.com/OISF/suricata-verify/tree/master/tests/app-layer-protocol-exact-http-invalid
- https://github.com/OISF/suricata-verify/tree/master/tests/app-layer-protocol-legacy-equivalence
- https://github.com/OISF/suricata-verify/tree/master/tests/app-layer-protocol-prefilter
- https://github.com/OISF/suricata-verify/tree/master/tests/firewall/app-layer-protocol-default-drop-unknown
- https://github.com/OISF/suricata-verify/tree/master/tests/firewall/app-layer-protocol-negated-list
- https://github.com/OISF/suricata-verify/tree/master/tests/firewall/app-layer-protocol-negated-unknown-shortcircuit
- https://github.com/OISF/suricata-verify/tree/master/tests/firewall/app-layer-protocol-unknown-tls-boundary