Ensure the Active firewalld Zones Do Not Accept All Traffic

Description

Every firewalld zone that is active on an interface other than the loopback interface or a virtual bridge (virbr*) should have a target other than ACCEPT, and the same target in the permanent configuration as in the running one. At least one such zone should be active. To set the target of a zone, run the following commands:

$ sudo firewall-cmd --permanent --zone=ZONE --set-target=DROP
$ sudo firewall-cmd --reload

Rationale

A zone with the ACCEPT target lets every packet through to the interfaces it holds, whatever services and ports the zone lists, and a target set only in the running configuration is lost at the next reload.

Warning

This rule does not come with a remediation. The target to use (default, DROP or REJECT) depends on the services the site exposes through the zone.