SV-257937r1106310_rule
V-257937
SRG-OS-000480-GPOS-00227
RHEL-09-251020
CAT II
10
Configure the "firewalld" daemon to employ a deny-all, allow-by-exception policy with the following commands:
Start by adding the exceptions that are required for mission functionality to the "drop" zone. If SSH access on port 22 is needed, for example, run the following: "sudo firewall-cmd --permanent --add-service=ssh --zone=drop"
Reload the firewall rules to update the runtime configuration from the "--permanent" changes made above:
$ sudo firewall-cmd --reload
Set the default zone to the drop zone:
$ sudo firewall-cmd --set-default-zone=drop
Note: This is a runtime and permanent change.
Add any interfaces to the newly modified "drop" zone:
$ sudo firewall-cmd --permanent --zone=drop --change-interface=ens192
Reload the firewall rules for changes to take effect:
$ sudo firewall-cmd --reload
Verify the RHEL 9 firewalld is configured to employ a deny-all, allow-by-exception policy for allowing connections to other systems with the following commands:
Ensure firewalld is running:
$ sudo firewall-cmd --state
running
Identify active zones:
$ sudo firewall-cmd --get-active-zones
drop
interfaces: ens192
Check what rules are applied in that zone:
$ sudo firewall-cmd --list-all --zone=$(firewall-cmd --get-default-zone)
drop (active)
target: DROP
icmp-block-inversion: no
interfaces: ens192
sources:
services: ssh
ports:
protocols:
forward: yes
masquerade: no
forward-ports:
source-ports:
icmp-blocks:
rich rules:
If no zones are active on the RHEL 9 interfaces or if runtime and permanent targets are set to a different option other than "DROP", this is a finding.
V-257937
False
RHEL-09-251020
Verify the RHEL 9 firewalld is configured to employ a deny-all, allow-by-exception policy for allowing connections to other systems with the following commands:
Ensure firewalld is running:
$ sudo firewall-cmd --state
running
Identify active zones:
$ sudo firewall-cmd --get-active-zones
drop
interfaces: ens192
Check what rules are applied in that zone:
$ sudo firewall-cmd --list-all --zone=$(firewall-cmd --get-default-zone)
drop (active)
target: DROP
icmp-block-inversion: no
interfaces: ens192
sources:
services: ssh
ports:
protocols:
forward: yes
masquerade: no
forward-ports:
source-ports:
icmp-blocks:
rich rules:
If no zones are active on the RHEL 9 interfaces or if runtime and permanent targets are set to a different option other than "DROP", this is a finding.
M
5551