Configure Stateful Firewall Actions
To configure stateful firewall actions, include the
thenstatement at the [edit services stateful-firewall rulerule-nametermterm-name] hierarchy level:[edit services stateful-firewall rulerule-nametermterm-name]then {(accept | discard | reject);allow-ip-option [values];syslog;}You must include one of the following three possible actions:
accept—The packet is accepted and sent on to its destination.discard—The packet is not accepted and is not processed further.reject—The packet is not accepted and a rejection message is returned; UDP sends an ICMP unreachable code and TCP sends RST. Rejected packets can be logged or sampled.You can optionally configure the firewall to record information in the system logging facility by including the
syslogstatement at the [edit services stateful-firewall rulerule-nametermterm-namethen] hierarchy level. This statement overrides anysyslogsetting included in the service set or interface default configuration.Configure IP Option Handling
You can optionally configure the firewall to inspect IP header information by including the
allow-ip-optionstatement at the[edit services stateful-firewall rulerule-nametermterm-namethen] hierarchy level. When you configure this statement, all packets that match the criteria specified in thefromstatement are subjected to additional matching criteria. A packet is accepted only when all of its IP option types are configured as values in theallow-ip-optionstatement. If you do not configureallow-ip-option, only packets without IP header options are accepted.The additional IP header option inspection applies only the
acceptandrejectstateful firewall actions. This configuration has no effect on thediscardaction. When the IP header inspection fails, reject frames are not sent; in this case, therejectaction has the same effect asdiscard.If an IP option packet is accepted by the stateful firewall, NAT and IDS services are applied in the same way as to packets without IP option headers. The IP option configuration appears only in the stateful firewall rules; NAT applies to packets with or without IP options, as long as the packet is accepted by the stateful firewall.
When a packet is dropped because it fails the IP option inspection, this exception event generates both IDS event and system log messages. The event type depends on the first IP option field rejected.
Table 7 lists the possible
allow-ip-optionvalues. You can include a range or set of numeric values, or one or more of the predefined IP option settings. You can enter either the option name or its numeric equivalent.