Configure Stateful Firewall Rule Content
To configure a stateful firewall rule, include the
rulerule-namestatement at the [edit services stateful-firewall] hierarchy level:[edit services stateful-firewall]rule rule-name {match-direction (input | output | input-output);termterm-name{from {applications [application-names];application-sets [set-names];destination-addressaddress;source-addressaddress;}then {(accept | discard | reject);allow-ip-option [values];syslog;}}}Each stateful firewall rule consists of a set of terms, similar to a filter configured at the [
edit firewall] hierarchy level. A term consists of the following:
fromstatement—Specifies the match conditions and applications that are included and excluded.thenstatement—Specifies the actions and action modifiers to be performed by the router software.In addition, each rule must include a
match-directionstatement that specifies the direction in which the rule match is applied. To configure where the match is applied, include thematch-directionstatement at the [edit services stateful-firewall rulerule-name] hierarchy level:[edit services stateful-firewall]rule rule-name {match-direction (input | output | input-output);}If you configure
match-direction input-output, bidirectional rule creation is allowed.The following sections describe stateful firewall rule content in more detail: