CIS Red Hat Enterprise Linux 8 Benchmark

Secure configuration guidelines for Red Hat Enterprise Linux 8 Server and Workstation

v3.0.0 June 2025

Overview

▶

This CIS Benchmark provides prescriptive guidance for establishing a secure configuration posture for Red Hat Enterprise Linux 8. Recommendations cover filesystem configuration, crypto policies, services, network parameters, firewall, auditing, SSH/PAM hardening, and system maintenance.

~250Recommendations
6Sections
2Profile Levels
SectionAreaFocus
1Initial SetupFilesystems, packages, crypto policy
2ServicesDaemons, clients, removals
3NetworkKernel params, firewalld
4Loggingauditd, rsyslog, permissions
5AccessSSH, PAM, passwords
6MaintenanceFile perms, user accounts

Profile Definitions

▶
ProfileDescriptionIntended Use
L1Level 1 — StandardEssential security for all RHEL 8 deployments; minimal performance impact.
L2Level 2 — HardenedAdvanced hardening for PCI-DSS, HIPAA, or high-security environments.

1 — Initial Setup

▶

1.1 Filesystem Configuration

▶
1.1.1 Ensure /tmp Is a Separate Partition (Automated)
L1 Auto
Description

This recommendation verifies that /tmp Is a Separate Partition on the RHEL 8 Linux operating system. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to implement this control may leave the RHEL 8 Linux operating system vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
findmnt --kernel /tmp
systemctl is-enabled tmp.mount
# Verify /tmp is a separate partition/mount
Remediation
systemctl unmask tmp.mount
systemctl enable --now tmp.mount

# Or add to /etc/fstab:
# tmpfs /tmp tmpfs defaults,rw,nosuid,nodev,noexec,relatime,size=2G 0 0
1.1.2 Ensure nodev Option Is Set on /tmp Partition (Automated)
L1 Auto
Description

This recommendation verifies that nodev Option Is Set on /tmp Partition on the RHEL 8 Linux operating system. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to implement this control may leave the RHEL 8 Linux operating system vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
findmnt --kernel /tmp | grep nodev
# Verify nodev is set on /tmp
Remediation
# Edit /etc/fstab — add nodev to /tmp options:
# tmpfs /tmp tmpfs defaults,rw,nosuid,nodev,noexec 0 0
mount -o remount /tmp
1.1.3 Ensure nosuid Option Is Set on /tmp Partition (Automated)
L1 Auto
Description

This recommendation verifies that nosuid Option Is Set on /tmp Partition on the RHEL 8 Linux operating system. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to implement this control may leave the RHEL 8 Linux operating system vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
findmnt --kernel /tmp | grep nosuid
Remediation
# Edit /etc/fstab — add nosuid to /tmp options
mount -o remount /tmp
1.1.4 Ensure noexec Option Is Set on /tmp Partition (Automated)
L1 Auto
Description

This recommendation verifies that noexec Option Is Set on /tmp Partition on the RHEL 8 Linux operating system. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to implement this control may leave the RHEL 8 Linux operating system vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
findmnt --kernel /tmp | grep noexec
Remediation
# Edit /etc/fstab — add noexec to /tmp options
mount -o remount /tmp
1.1.5 Ensure /var Is a Separate Partition (Automated)
L2 Auto
Description

This recommendation verifies that /var Is a Separate Partition on the RHEL 8 Linux operating system. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to implement this control may leave the RHEL 8 Linux operating system vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
findmnt --kernel /var
# Verify /var is a separate partition
Remediation
# Partition /var at install time or migrate:
lvcreate -L 10G -n var_lv rhel_vg
mkfs.xfs /dev/rhel_vg/var_lv
# Update /etc/fstab:
# /dev/rhel_vg/var_lv /var xfs defaults 0 0
1.1.6 Ensure /var/log Is a Separate Partition (Automated)
L2 Auto
Description

This recommendation verifies that /var/log Is a Separate Partition on the RHEL 8 Linux operating system. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to implement this control may leave the RHEL 8 Linux operating system vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
findmnt --kernel /var/log
# Verify /var/log is a separate partition
Remediation
# Partition /var/log at install time or create LV:
lvcreate -L 5G -n varlog_lv rhel_vg
mkfs.xfs /dev/rhel_vg/varlog_lv
# Update /etc/fstab

1.2 Software Updates & Subscription

▶
1.2.1 Ensure GPG Check Is Globally Activated (Automated)
L1 Auto
Description

This recommendation verifies that GPG Check Is Globally Activated on the RHEL 8 Linux operating system. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to implement this control may leave the RHEL 8 Linux operating system vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
dnf repolist
# Verify all repos use gpgcheck
grep -r 'gpgcheck' /etc/yum.repos.d/
Remediation
# Ensure gpgcheck=1 in all repo files:
sed -i 's/^gpgcheck=0/gpgcheck=1/' /etc/yum.repos.d/*.repo

# In /etc/dnf/dnf.conf:
sed -i 's/^gpgcheck=0/gpgcheck=1/' /etc/dnf/dnf.conf
1.2.2 Ensure Red Hat Subscription Manager Is Configured (Manual)
L1 Manual
Description

This recommendation verifies that Red Hat Subscription Manager Is Configured on the RHEL 8 Linux operating system. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to implement this control may leave the RHEL 8 Linux operating system vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
rpm -q subscription-manager
subscription-manager identity
subscription-manager status
Remediation
subscription-manager register --username <user> --password <pass>
subscription-manager attach --auto
1.2.3 Ensure Security Updates Are Applied (Automated)
L1 Auto
Description

This recommendation verifies that Security Updates Are Applied on the RHEL 8 Linux operating system. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to implement this control may leave the RHEL 8 Linux operating system vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
dnf check-update --security
# Review pending security updates
Remediation
dnf update -y --security
# Or full update:
dnf update -y

1.3 System-Wide Crypto Policy

▶
1.3.1 Ensure System-Wide Crypto Policy Is Not Legacy (Automated)
L1 Auto
Description

This recommendation verifies that System-Wide Crypto Policy Is Not Legacy on the RHEL 8 Linux operating system. Disabling or removing unnecessary components reduces the attack surface and limits potential vectors for exploitation.

Rationale

Running unnecessary components on the RHEL 8 Linux operating system increases the attack surface and the risk of exploitation. Disabling or removing them follows the principle of least functionality and reduces exposure to known vulnerabilities.

Audit
update-crypto-policies --show
# Should return DEFAULT, FUTURE, or FIPS (not LEGACY)
Remediation
update-crypto-policies --set DEFAULT
# Or for higher security:
update-crypto-policies --set FUTURE
1.3.2 Ensure SHA1 Is Not Used in Crypto Policy (Automated)
L1 Auto
Description

This recommendation verifies that SHA1 Is Not Used in Crypto Policy on the RHEL 8 Linux operating system. Disabling or removing unnecessary components reduces the attack surface and limits potential vectors for exploitation.

Rationale

Running unnecessary components on the RHEL 8 Linux operating system increases the attack surface and the risk of exploitation. Disabling or removing them follows the principle of least functionality and reduces exposure to known vulnerabilities.

Audit
grep -i '\bsha1\b' /etc/crypto-policies/back-ends/*.config 2>/dev/null
# Should return empty — SHA1 not allowed for signing
Remediation
update-crypto-policies --set DEFAULT:NO-SHA1
# Or use FUTURE policy which excludes SHA1:
update-crypto-policies --set FUTURE

2 — Services

▶

2.1 Unnecessary Services

▶
2.1.1 Ensure autofs Is Not Installed or Disabled (Automated)
L1 Auto
Description

This recommendation verifies that autofs Is Not Installed or Disabled on the RHEL 8 Linux operating system. Disabling or removing unnecessary components reduces the attack surface and limits potential vectors for exploitation.

Rationale

Running unnecessary components on the RHEL 8 Linux operating system increases the attack surface and the risk of exploitation. Disabling or removing them follows the principle of least functionality and reduces exposure to known vulnerabilities.

Audit
systemctl is-active autofs
systemctl is-enabled autofs
# Both should be inactive/disabled
Remediation
systemctl stop autofs
systemctl disable autofs
systemctl mask autofs
2.1.2 Ensure Avahi Server Is Not Running (Automated)
L1 Auto
Description

This recommendation verifies that Avahi Server Is Not Running on the RHEL 8 Linux operating system. Disabling or removing unnecessary components reduces the attack surface and limits potential vectors for exploitation.

Rationale

Running unnecessary components on the RHEL 8 Linux operating system increases the attack surface and the risk of exploitation. Disabling or removing them follows the principle of least functionality and reduces exposure to known vulnerabilities.

Audit
systemctl is-active avahi-daemon
systemctl is-enabled avahi-daemon
Remediation
systemctl stop avahi-daemon
systemctl disable avahi-daemon
systemctl mask avahi-daemon
dnf remove -y avahi
2.1.3 Ensure CUPS Is Not Running Unless Required (Automated)
L1 Auto
Description

This recommendation verifies that CUPS Is Not Running Unless Required on the RHEL 8 Linux operating system. Disabling or removing unnecessary components reduces the attack surface and limits potential vectors for exploitation.

Rationale

Running unnecessary components on the RHEL 8 Linux operating system increases the attack surface and the risk of exploitation. Disabling or removing them follows the principle of least functionality and reduces exposure to known vulnerabilities.

Audit
systemctl is-active cups
systemctl is-enabled cups
Remediation
systemctl stop cups
systemctl disable cups
# If not needed:
dnf remove -y cups
2.1.4 Ensure NFS Is Not Running Unless Required (Automated)
L1 Auto
Description

This recommendation verifies that NFS Is Not Running Unless Required on the RHEL 8 Linux operating system. Disabling or removing unnecessary components reduces the attack surface and limits potential vectors for exploitation.

Rationale

Running unnecessary components on the RHEL 8 Linux operating system increases the attack surface and the risk of exploitation. Disabling or removing them follows the principle of least functionality and reduces exposure to known vulnerabilities.

Audit
rpm -q nfs-utils
systemctl is-enabled nfs-server
systemctl is-active nfs-server
Remediation
systemctl stop nfs-server
systemctl disable nfs-server
systemctl mask nfs-server
2.1.5 Ensure rpcbind Is Not Running Unless Required (Automated)
L1 Auto
Description

This recommendation verifies that rpcbind Is Not Running Unless Required on the RHEL 8 Linux operating system. Disabling or removing unnecessary components reduces the attack surface and limits potential vectors for exploitation.

Rationale

Running unnecessary components on the RHEL 8 Linux operating system increases the attack surface and the risk of exploitation. Disabling or removing them follows the principle of least functionality and reduces exposure to known vulnerabilities.

Audit
rpm -q rpcbind
systemctl is-enabled rpcbind
systemctl is-active rpcbind
Remediation
systemctl stop rpcbind
systemctl disable rpcbind
systemctl mask rpcbind
2.1.6 Ensure vsftpd Is Not Running Unless Required (Automated)
L1 Auto
Description

This recommendation verifies that vsftpd Is Not Running Unless Required on the RHEL 8 Linux operating system. Disabling or removing unnecessary components reduces the attack surface and limits potential vectors for exploitation.

Rationale

Running unnecessary components on the RHEL 8 Linux operating system increases the attack surface and the risk of exploitation. Disabling or removing them follows the principle of least functionality and reduces exposure to known vulnerabilities.

Audit
rpm -q vsftpd
systemctl is-enabled vsftpd
systemctl is-active vsftpd
Remediation
systemctl stop vsftpd
systemctl disable vsftpd
dnf remove -y vsftpd

2.2 Service Clients

▶
2.2.1 Ensure NIS Client Is Not Installed (Automated)
L1 Auto
Description

This recommendation verifies that NIS Client Is Not Installed on the RHEL 8 Linux operating system. Disabling or removing unnecessary components reduces the attack surface and limits potential vectors for exploitation.

Rationale

Running unnecessary components on the RHEL 8 Linux operating system increases the attack surface and the risk of exploitation. Disabling or removing them follows the principle of least functionality and reduces exposure to known vulnerabilities.

Audit
rpm -q ypbind
# Should return: package ypbind is not installed
Remediation
dnf remove -y ypbind
2.2.2 Ensure telnet Client Is Not Installed (Automated)
L1 Auto
Description

This recommendation verifies that telnet Client Is Not Installed on the RHEL 8 Linux operating system. Disabling or removing unnecessary components reduces the attack surface and limits potential vectors for exploitation.

Rationale

Running unnecessary components on the RHEL 8 Linux operating system increases the attack surface and the risk of exploitation. Disabling or removing them follows the principle of least functionality and reduces exposure to known vulnerabilities.

Audit
rpm -q telnet
# Should return: package telnet is not installed
Remediation
dnf remove -y telnet
2.2.3 Ensure LDAP Client Is Not Installed (Automated)
L1 Auto
Description

This recommendation verifies that LDAP Client Is Not Installed on the RHEL 8 Linux operating system. Disabling or removing unnecessary components reduces the attack surface and limits potential vectors for exploitation.

Rationale

Running unnecessary components on the RHEL 8 Linux operating system increases the attack surface and the risk of exploitation. Disabling or removing them follows the principle of least functionality and reduces exposure to known vulnerabilities.

Audit
rpm -q openldap-clients
# Should return: package openldap-clients is not installed
Remediation
dnf remove -y openldap-clients

3 — Network Configuration

▶

3.1 Network Parameters (Host)

▶
3.1.1 Ensure IP Forwarding Is Disabled (Automated)
L1 Auto
Description

This recommendation verifies that IP Forwarding Is Disabled on the RHEL 8 Linux operating system. Disabling or removing unnecessary components reduces the attack surface and limits potential vectors for exploitation.

Rationale

Running unnecessary components on the RHEL 8 Linux operating system increases the attack surface and the risk of exploitation. Disabling or removing them follows the principle of least functionality and reduces exposure to known vulnerabilities.

Audit
sysctl net.ipv4.ip_forward
# Should be 0
sysctl net.ipv6.conf.all.forwarding
# Should be 0
Remediation
echo 'net.ipv4.ip_forward = 0' > /etc/sysctl.d/60-netipv4.conf
echo 'net.ipv6.conf.all.forwarding = 0' > /etc/sysctl.d/60-netipv6.conf
sysctl -w net.ipv4.ip_forward=0
sysctl -w net.ipv6.conf.all.forwarding=0
3.1.2 Ensure Packet Redirect Sending Is Disabled (Automated)
L1 Auto
Description

This recommendation verifies that Packet Redirect Sending Is Disabled on the RHEL 8 Linux operating system. Disabling or removing unnecessary components reduces the attack surface and limits potential vectors for exploitation.

Rationale

Running unnecessary components on the RHEL 8 Linux operating system increases the attack surface and the risk of exploitation. Disabling or removing them follows the principle of least functionality and reduces exposure to known vulnerabilities.

Audit
sysctl net.ipv4.conf.all.send_redirects
sysctl net.ipv4.conf.default.send_redirects
# Both should return 0
Remediation
printf 'net.ipv4.conf.all.send_redirects = 0\nnet.ipv4.conf.default.send_redirects = 0\n' >> /etc/sysctl.d/60-netipv4.conf
sysctl -w net.ipv4.conf.all.send_redirects=0
sysctl -w net.ipv4.conf.default.send_redirects=0
3.1.3 Ensure ICMP Redirects Are Not Accepted (Automated)
L1 Auto
Description

This recommendation verifies that ICMP Redirects Are Not Accepted on the RHEL 8 Linux operating system. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to implement this control may leave the RHEL 8 Linux operating system vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
sysctl net.ipv4.conf.all.accept_redirects
sysctl net.ipv4.conf.default.accept_redirects
sysctl net.ipv6.conf.all.accept_redirects
sysctl net.ipv6.conf.default.accept_redirects
# All should return 0
Remediation
printf 'net.ipv4.conf.all.accept_redirects = 0\nnet.ipv4.conf.default.accept_redirects = 0\n' >> /etc/sysctl.d/60-netipv4.conf
printf 'net.ipv6.conf.all.accept_redirects = 0\nnet.ipv6.conf.default.accept_redirects = 0\n' >> /etc/sysctl.d/60-netipv6.conf
sysctl --system
3.1.4 Ensure Suspicious Packets Are Logged (Automated)
L1 Auto
Description

This recommendation verifies that Suspicious Packets Are Logged on the RHEL 8 Linux operating system. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to implement this control may leave the RHEL 8 Linux operating system vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
sysctl net.ipv4.conf.all.log_martians
sysctl net.ipv4.conf.default.log_martians
# Both should return 1
Remediation
printf 'net.ipv4.conf.all.log_martians = 1\nnet.ipv4.conf.default.log_martians = 1\n' >> /etc/sysctl.d/60-netipv4.conf
sysctl -w net.ipv4.conf.all.log_martians=1
sysctl -w net.ipv4.conf.default.log_martians=1

3.2 Firewall Configuration

▶
3.2.1 Ensure firewalld Is Installed and Running (Automated)
L1 Auto
Description

This recommendation verifies that firewalld Is Installed and Running on the RHEL 8 Linux operating system. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to implement this control may leave the RHEL 8 Linux operating system vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
rpm -q firewalld
systemctl is-enabled firewalld
systemctl is-active firewalld
firewall-cmd --state
Remediation
dnf install -y firewalld
systemctl enable --now firewalld
3.2.2 Ensure Default Zone Is Set to Drop or Block (Automated)
L1 Auto
Description

This recommendation verifies that Default Zone Is Set to Drop or Block on the RHEL 8 Linux operating system. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to implement this control may leave the RHEL 8 Linux operating system vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
firewall-cmd --get-default-zone
firewall-cmd --list-all
# Verify default zone is drop or block for public
Remediation
firewall-cmd --set-default-zone=drop
firewall-cmd --runtime-to-permanent
3.2.3 Ensure Unnecessary Services Are Removed (Manual)
L1 Manual
Description

This recommendation verifies that Unnecessary Services Are Removed on the RHEL 8 Linux operating system. Disabling or removing unnecessary components reduces the attack surface and limits potential vectors for exploitation.

Rationale

Running unnecessary components on the RHEL 8 Linux operating system increases the attack surface and the risk of exploitation. Disabling or removing them follows the principle of least functionality and reduces exposure to known vulnerabilities.

Audit
firewall-cmd --list-services
firewall-cmd --list-ports
# Review and remove unnecessary services/ports
Remediation
firewall-cmd --remove-service=<service_name> --permanent
firewall-cmd --remove-port=<port/protocol> --permanent
firewall-cmd --reload
3.2.4 Ensure Only Necessary Services Are Allowed (Manual)
L1 Manual
Description

This recommendation verifies that Only Necessary Services Are Allowed on the RHEL 8 Linux operating system. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to implement this control may leave the RHEL 8 Linux operating system vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
firewall-cmd --list-all --zone=public
# Verify only necessary services are allowed
Remediation
# Add only required services:
firewall-cmd --add-service=ssh --permanent
firewall-cmd --add-service=https --permanent
firewall-cmd --reload

4 — Logging & Auditing

▶

4.1 Configure Auditing

▶
4.1.1 Ensure auditd Is Installed and Enabled (Automated)
L1 Auto
Description

This recommendation verifies that auditd Is Installed and Enabled on the RHEL 8 Linux operating system. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to implement this control may leave the RHEL 8 Linux operating system vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
rpm -q audit
systemctl is-enabled auditd
systemctl is-active auditd
Remediation
dnf install -y audit
systemctl enable --now auditd
4.1.2 Ensure Audit Log Size Is Configured (Automated)
L1 Auto
Description

This recommendation verifies that Audit Log Size Is Configured on the RHEL 8 Linux operating system. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to implement this control may leave the RHEL 8 Linux operating system vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
grep -E '^max_log_file\s*=' /etc/audit/auditd.conf
grep -E '^max_log_file_action' /etc/audit/auditd.conf
Remediation
sed -i 's/^max_log_file\s*=.*/max_log_file = 8/' /etc/audit/auditd.conf
sed -i 's/^max_log_file_action.*/max_log_file_action = keep_logs/' /etc/audit/auditd.conf
systemctl restart auditd
4.1.3 Ensure Date and Time Changes Are Collected (Automated)
L1 Auto
Description

This recommendation verifies that Date and Time Changes Are Collected on the RHEL 8 Linux operating system. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to implement this control may leave the RHEL 8 Linux operating system vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
auditctl -l | grep -E 'time-change|adjtimex|settimeofday|clock_settime'
grep time-change /etc/audit/rules.d/*.rules
Remediation
cat >> /etc/audit/rules.d/50-time.rules << 'EOF'
-a always,exit -F arch=b64 -S adjtimex -S settimeofday -k time-change
-a always,exit -F arch=b32 -S adjtimex -S settimeofday -S stime -k time-change
-a always,exit -F arch=b64 -S clock_settime -k time-change
-w /etc/localtime -p wa -k time-change
EOF
augenrules --load
4.1.4 Ensure User/Group Modification Events Are Collected (Automated)
L1 Auto
Description

This recommendation verifies that User/Group Modification Events Are Collected on the RHEL 8 Linux operating system. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to implement this control may leave the RHEL 8 Linux operating system vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
auditctl -l | grep identity
grep identity /etc/audit/rules.d/*.rules
Remediation
cat >> /etc/audit/rules.d/50-identity.rules << 'EOF'
-w /etc/group -p wa -k identity
-w /etc/passwd -p wa -k identity
-w /etc/gshadow -p wa -k identity
-w /etc/shadow -p wa -k identity
-w /etc/security/opasswd -p wa -k identity
EOF
augenrules --load
4.1.5 Ensure Sudoers Changes Are Collected (Automated)
L1 Auto
Description

This recommendation verifies that Sudoers Changes Are Collected on the RHEL 8 Linux operating system. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to implement this control may leave the RHEL 8 Linux operating system vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
auditctl -l | grep scope
grep scope /etc/audit/rules.d/*.rules
Remediation
cat >> /etc/audit/rules.d/50-scope.rules << 'EOF'
-w /etc/sudoers -p wa -k scope
-w /etc/sudoers.d/ -p wa -k scope
EOF
augenrules --load

4.2 Configure Logging

▶
4.2.1 Ensure rsyslog Is Installed and Running (Automated)
L1 Auto
Description

This recommendation verifies that rsyslog Is Installed and Running on the RHEL 8 Linux operating system. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to implement this control may leave the RHEL 8 Linux operating system vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
rpm -q rsyslog
systemctl is-enabled rsyslog
systemctl is-active rsyslog
Remediation
dnf install -y rsyslog
systemctl enable --now rsyslog
4.2.2 Ensure Remote Logging Is Configured (Automated)
L1 Auto
Description

This recommendation verifies that Remote Logging Is Configured on the RHEL 8 Linux operating system. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to implement this control may leave the RHEL 8 Linux operating system vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
grep -E '^\*\.\*\s+@@' /etc/rsyslog.conf /etc/rsyslog.d/*.conf 2>/dev/null
# Verify remote log host is configured
Remediation
echo '*.* @@loghost.example.com:514' >> /etc/rsyslog.d/50-remote.conf
systemctl restart rsyslog
4.2.3 Ensure Log File Permissions Are Configured (Automated)
L1 Auto
Description

This recommendation verifies that Log File Permissions Are Configured on the RHEL 8 Linux operating system. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to implement this control may leave the RHEL 8 Linux operating system vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
find /var/log -type f -perm /037 -ls 2>/dev/null
stat -c '%a %U %G' /var/log/messages /var/log/secure
Remediation
chmod 640 /var/log/messages
chmod 640 /var/log/secure
find /var/log -type f -perm /037 -exec chmod 640 {} \;

5 — Access & Authentication

▶

5.1 SSH Server Configuration

▶
5.1.1 Ensure SSH Root Login Is Disabled (Automated)
L1 Auto
Description

This recommendation verifies that SSH Root Login Is Disabled on the RHEL 8 Linux operating system. Disabling or removing unnecessary components reduces the attack surface and limits potential vectors for exploitation.

Rationale

Running unnecessary components on the RHEL 8 Linux operating system increases the attack surface and the risk of exploitation. Disabling or removing them follows the principle of least functionality and reduces exposure to known vulnerabilities.

Audit
sshd -T | grep permitrootlogin
# Should return: permitrootlogin no
Remediation
sed -i 's/^#\?PermitRootLogin.*/PermitRootLogin no/' /etc/ssh/sshd_config
systemctl reload sshd
5.1.2 Ensure SSH MaxAuthTries Is Set to 4 or Less (Automated)
L1 Auto
Description

This recommendation verifies that SSH MaxAuthTries Is Set to 4 or Less on the RHEL 8 Linux operating system. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to implement this control may leave the RHEL 8 Linux operating system vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
sshd -T | grep maxauthtries
# Should return: maxauthtries 4 (or less)
Remediation
sed -i 's/^#\?MaxAuthTries.*/MaxAuthTries 4/' /etc/ssh/sshd_config
systemctl reload sshd
5.1.3 Ensure SSH PermitEmptyPasswords Is Disabled (Automated)
L1 Auto
Description

This recommendation verifies that SSH PermitEmptyPasswords Is Disabled on the RHEL 8 Linux operating system. Disabling or removing unnecessary components reduces the attack surface and limits potential vectors for exploitation.

Rationale

Running unnecessary components on the RHEL 8 Linux operating system increases the attack surface and the risk of exploitation. Disabling or removing them follows the principle of least functionality and reduces exposure to known vulnerabilities.

Audit
sshd -T | grep permitemptypasswords
# Should return: permitemptypasswords no
Remediation
sed -i 's/^#\?PermitEmptyPasswords.*/PermitEmptyPasswords no/' /etc/ssh/sshd_config
systemctl reload sshd
5.1.4 Ensure Only Strong SSH Ciphers Are Used (Automated)
L1 Auto
Description

This recommendation verifies that Only Strong SSH Ciphers Are Used on the RHEL 8 Linux operating system. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to implement this control may leave the RHEL 8 Linux operating system vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
sshd -T | grep -i 'ciphers'
# Verify only strong ciphers are listed
# Expected: aes256-gcm@openssh.com,aes128-gcm@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr
Remediation
echo 'Ciphers aes256-gcm@openssh.com,aes128-gcm@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr' >> /etc/ssh/sshd_config
systemctl reload sshd
5.1.5 Ensure SSH Idle Timeout Is Configured (Automated)
L1 Auto
Description

This recommendation verifies that SSH Idle Timeout Is Configured on the RHEL 8 Linux operating system. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to implement this control may leave the RHEL 8 Linux operating system vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
sshd -T | grep -E 'clientaliveinterval|clientalivecountmax'
# clientaliveinterval <= 300, clientalivecountmax <= 3
Remediation
sed -i 's/^#\?ClientAliveInterval.*/ClientAliveInterval 300/' /etc/ssh/sshd_config
sed -i 's/^#\?ClientAliveCountMax.*/ClientAliveCountMax 3/' /etc/ssh/sshd_config
systemctl reload sshd
5.1.6 Ensure SSH Warning Banner Is Configured (Automated)
L1 Auto
Description

This recommendation verifies that SSH Warning Banner Is Configured on the RHEL 8 Linux operating system. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to implement this control may leave the RHEL 8 Linux operating system vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
sshd -T | grep banner
# Should return: banner /etc/issue.net
Remediation
sed -i 's/^#\?Banner.*/Banner \/etc\/issue.net/' /etc/ssh/sshd_config
systemctl reload sshd

5.2 PAM & Password Settings

▶
5.2.1 Ensure Password Creation Requirements Are Configured (Automated)
L1 Auto
Description

This recommendation ensures that Password Creation Requirements Are Configured on the RHEL 8 Linux operating system. Enforcing this requirement establishes a minimum security standard and prevents insecure configurations.

Rationale

Without this enforcement, the RHEL 8 Linux operating system may accept insecure configurations that weaken overall security posture. Mandating this control ensures consistent protection against common attack vectors.

Audit
grep -E '^\s*minlen|dcredit|ucredit|ocredit|lcredit' /etc/security/pwquality.conf
# minlen >= 14; dcredit, ucredit, ocredit, lcredit <= -1
Remediation
sed -i 's/^#\? *minlen.*/minlen = 14/' /etc/security/pwquality.conf
sed -i 's/^#\? *dcredit.*/dcredit = -1/' /etc/security/pwquality.conf
sed -i 's/^#\? *ucredit.*/ucredit = -1/' /etc/security/pwquality.conf
sed -i 's/^#\? *ocredit.*/ocredit = -1/' /etc/security/pwquality.conf
sed -i 's/^#\? *lcredit.*/lcredit = -1/' /etc/security/pwquality.conf
5.2.2 Ensure Password Reuse Is Limited (Automated)
L1 Auto
Description

This setting ensures that Password Reuse Is Limited on the RHEL 8 Linux operating system. Restricting this capability limits potential abuse and enforces the principle of least privilege across the environment.

Rationale

Unrestricted access to this capability could allow unauthorized users or processes to perform actions beyond their intended scope. Applying least-privilege principles to the RHEL 8 Linux operating system is essential for defense in depth.

Audit
grep -E 'pam_pwhistory|remember' /etc/pam.d/system-auth
# Verify remember is set to 5 or more
Remediation
# Edit /etc/pam.d/system-auth:
# password requisite pam_pwhistory.so use_authtok remember=5 retry=3
authselect create-profile hardening -b sssd
authselect select custom/hardening with-faillock with-mkhomedir
5.2.3 Ensure Lockout for Failed Password Attempts Is Configured (Automated)
L1 Auto
Description

This recommendation verifies that Lockout for Failed Password Attempts Is Configured on the RHEL 8 Linux operating system. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to implement this control may leave the RHEL 8 Linux operating system vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
grep pam_faillock /etc/pam.d/system-auth /etc/pam.d/password-auth
# Verify deny=5, unlock_time=900

grep -E '^deny|^unlock_time|^fail_interval' /etc/security/faillock.conf
Remediation
# Configure /etc/security/faillock.conf:
sed -i 's/^#\? *deny.*/deny = 5/' /etc/security/faillock.conf
sed -i 's/^#\? *unlock_time.*/unlock_time = 900/' /etc/security/faillock.conf
sed -i 's/^#\? *fail_interval.*/fail_interval = 900/' /etc/security/faillock.conf
authselect enable-feature with-faillock
authselect apply-changes

6 — System Maintenance

▶

6.1 File Permissions

▶
6.1.1 Ensure Permissions on /etc/passwd Are Configured (Automated)
L1 Auto
Description

This recommendation verifies that Permissions on /etc/passwd Are Configured on the RHEL 8 Linux operating system. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to implement this control may leave the RHEL 8 Linux operating system vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
stat -c '%a %U %G' /etc/passwd
# Should return: 644 root root
Remediation
chmod 644 /etc/passwd
chown root:root /etc/passwd
6.1.2 Ensure Permissions on /etc/shadow Are Configured (Automated)
L1 Auto
Description

This recommendation verifies that Permissions on /etc/shadow Are Configured on the RHEL 8 Linux operating system. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to implement this control may leave the RHEL 8 Linux operating system vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
stat -c '%a %U %G' /etc/shadow
# Should return: 0 root root
Remediation
chmod 0000 /etc/shadow
chown root:root /etc/shadow
6.1.3 Ensure Permissions on /etc/group Are Configured (Automated)
L1 Auto
Description

This recommendation verifies that Permissions on /etc/group Are Configured on the RHEL 8 Linux operating system. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to implement this control may leave the RHEL 8 Linux operating system vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
stat -c '%a %U %G' /etc/group
# Should return: 644 root root
Remediation
chmod 644 /etc/group
chown root:root /etc/group
6.1.4 Ensure Permissions on /etc/gshadow Are Configured (Automated)
L1 Auto
Description

This recommendation verifies that Permissions on /etc/gshadow Are Configured on the RHEL 8 Linux operating system. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to implement this control may leave the RHEL 8 Linux operating system vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
stat -c '%a %U %G' /etc/gshadow
# Should return: 0 root root
Remediation
chmod 0000 /etc/gshadow
chown root:root /etc/gshadow
6.1.5 Ensure No World-Writable Files Exist (Automated)
L1 Auto
Description

This recommendation verifies that No World-Writable Files Exist on the RHEL 8 Linux operating system. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to implement this control may leave the RHEL 8 Linux operating system vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
find / -xdev -type f -perm -0002 -ls 2>/dev/null
# Should return empty
Remediation
find / -xdev -type f -perm -0002 -exec chmod o-w {} \;

6.2 User & Group Settings

▶
6.2.1 Ensure No Accounts Have Empty Passwords (Automated)
L1 Auto
Description

This recommendation verifies that No Accounts Have Empty Passwords on the RHEL 8 Linux operating system. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to implement this control may leave the RHEL 8 Linux operating system vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
awk -F: '($2 == "") {print $1}' /etc/shadow
# Should return empty — no empty passwords
Remediation
awk -F: '($2 == "") {print $1}' /etc/shadow | while read user; do
  passwd -l "$user"
done
6.2.2 Ensure Root Is the Only UID 0 Account (Automated)
L1 Auto
Description

This recommendation verifies that Root Is the Only UID 0 Account on the RHEL 8 Linux operating system. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to implement this control may leave the RHEL 8 Linux operating system vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
awk -F: '($3 == 0) {print $1}' /etc/passwd
# Should return only: root
Remediation
# Change UID of non-root UID 0 accounts:
usermod -u <new_uid> <username>
6.2.3 Ensure No Legacy '+' Entries Exist (Automated)
L1 Auto
Description

This recommendation verifies that No Legacy '+' Entries Exist on the RHEL 8 Linux operating system. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to implement this control may leave the RHEL 8 Linux operating system vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
grep -E '^\+' /etc/passwd /etc/shadow /etc/group
# Should return empty — no legacy '+' entries
Remediation
# Remove any '+' entries from:
# /etc/passwd, /etc/shadow, /etc/group
sed -i '/^+/d' /etc/passwd
sed -i '/^+/d' /etc/shadow
sed -i '/^+/d' /etc/group