4.1.4 Ensure firewalld active zone target is configured

Information

FirewallD zones are a network or firewall zone that defines the trust level of the interface used for a connection. There are several pre-defined zones provided by firewalld.

A zone target may be set to ACCEPT %%REJECT%% or DROP This can be used to accept, reject, or drop every packet that doesn't match any rule (port, service, etc). The ACCEPT target is used in the trusted zone to accept every packet not matching any rule, e.g. accept all. The %%REJECT%% target is used in the block zone to reject, with default firewall reject type, every packet not matching any rule. The DROP target is used in the drop zone to drop every packet not matching any rule. If the target is not specified, every packet not matching and rule will be rejected.

Note: The target may also be set to default The default target provides a convenient way to implement a "deny by default, allow by exception" policy within a firewalld zone, while still allowing essential ICMP traffic.

With a default accept policy the firewall will accept any packet that is not configured to be denied. It is easier to allow list acceptable usage than to deny list unacceptable usage.

NOTE: Nessus has provided the target output to assist in reviewing the benchmark to ensure target compliance.

Solution

Run the following command to update an active zone target and write a permanent firewalld rule:

# firewall-cmd --zone={ACTIVE_ZONE} --set-target={TARGET} --permanent

Example:

# firewall-cmd --zone=public --set-target=DROP --permanent

Note: --set-target=default is also acceptable.

See Also

https://workbench.cisecurity.org/benchmarks/24008

Item Details

Category: SECURITY ASSESSMENT AND AUTHORIZATION, SYSTEM AND COMMUNICATIONS PROTECTION

References: 800-53|CA-9, 800-53|SC-7, 800-53|SC-7(5), CSCv7|9.4

Plugin: Unix

Control ID: 6aa7d2fc8762c72db1aa78120cb3f61e0298a453acab382eb4d51cbc5d83bca7