Child pages
  • Red Hat Enterprise Linux 7 Hardening Checklist

Skip to end of metadata
Go to start of metadata

The hardening checklists are based on the comprehensive checklists produced by CIS. The Information Security Office has distilled the CIS lists down to the most critical steps for your systems, with a particular focus on configuration issues that are unique to the computing environment at The University of Texas at Austin.

How to use the checklist

Print the checklist and check off each item you complete to ensure that you cover the critical steps for securing your server. The Information Security Office uses this checklist during risk assessments as part of the process to verify that servers are secure.

How to read the checklist

Server Information

MAC Address


IP Address


Machine Name


Asset Tag


Administrator Name





To Do


UT Note

Cat I


Min Std



Preparation and Physical Security








If machine is a new install, protect it from hostile network traffic until the operating system is installed and hardened.








Set a BIOS/firmware password.






3 Configure the device boot order to prevent unauthorized booting from alternate media.     
4 Use the latest version of RHEL possible.1.7 !!5.2
  Filesystem Configuration     
5 Create a separate partition with the nodev, nosuid, and noexec options set for /tmp.1.1.1-.4§   
6 Create separate partitions for /var, /var/log, /var/log/audit, and /home.1.1.{5,7,8,9}§   
7 Bind mount /var/tmp to /tmp.1.1.6    
8 Set nodev option to /home.1.1.10    
9 Set nodev, nosuid, and noexec options on /dev/shm.1.1.14-.16    
10 Set sticky bit on all world-writable directories.1.1.17    



System Updates






11 Register with Red Hat Satellite Server so that the system can receive patch updates.1.2.1§!!5.2
12 Install the Red Hat GPG key and enable gpgcheck.1.2.2-.3    
  Secure Boot Settings     
13 Set user/group owner to root, and permissions to read and write for root only, on /boot/grub2/grub.cfg.1.5.1-.2§   
14 Set boot loader password.1.5.3    
15 Remove the X Window system.3.2§   



Disable X Font Server.






  Process Hardening     
17 Restrict core dumps.1.6.1§   
18 Enable Randomized Virtual Memory Region Placement.1.6.2§!  
  OS Hardening     
19 Remove legacy services (e.g., telnet-server; rsh, rlogin, rcp; ypserv, ypbind; tftp, tftp-server; talk, talk-server)2.1.{1,3-10} !! 



Disable any services and applications started by xinetd or inetd that are not being utilized.






21 Remove xinetd, if possible.2.1.11§!  
22 Disable legacy services (e.g., chargen-dgram, chargen-stream, daytime-dgram, daytime-stream, echo-dgram, echo-stream, tcpmux-server)2.1.{12-18} !! 
23 Disable or remove server services that are not going to be utilized (e.g., FTP, DNS, LDAP, SMB, DHCP, NFS, SNMP, etc.)  ! 5.4
24 Set Daemon umask3.1    
  Network Security and Firewall Configuration     



Limit connections to services running on the host to authorized users of the service via firewalls and other access control technologies.






26 Disable IP forwarding.4.1.1    
27 Disable send packet redirects.4.1.2    
28 Disable source routed packet acceptance.4.2.1    
29 Disable ICMP redirect acceptance.4.2.2    
30 Enable Ignore Broadcast Requests.4.2.5    
31 Enable Bad Error Message Protection.4.2.6    
32 Enable TCP/SYN cookies.4.2.8    
  Remote Administration via SSH     



Set SSH protocol to 2.






34 Set SSH LogLevel to INFO.6.2.2§!! 
35 Disable SSH Root login.6.2.8§   
36 Set SSH PermitEmptyPasswords to No.6.2.9 !! 
  System Integrity and Intrusion Detection     
37 Install and configure AIDE.1.3.1-.2§  5.8
38 Configure SELinux.1.4.1-.6§   
39 Install and configure OSSec HIDS. §   











Configure Network Time Protocol (NTP).








Enable system accounting (auditd).






42 Install and configure rsyslog.5.1.1-.4§!  



All administrator or root access must be logged.






44 Configure log shipping to separate device/service (e.g. Splunk).5.1.5§   



Files/Directory Permissions/Access








Integrity checking of system accounts, group memberships, and their associated privileges should be enabled and tested.








PAM Configuration








Ensure that the configuration files for PAM, /etc/pam.d/* are secure.






47 Upgrade password hashing algorithm to SHA-512.6.3.1 !  
48 Set password creation requirements.6.3.2§!! 
49 Restrict root login to system console.6.4§   



Warning Banners








If network or physical access services are running, ensure the university warning banner is displayed.

6.2.14, 8.1







If the system allows logins via a graphical user interface, ensure the university warning banner is displayed prior to login.








Anti-Virus Considerations








Install and enable anti-virus software.







Configure to update signature daily on AV.







Additional Security Notes








Systems will provide secure storage for Category-I data as required by confidentiality, integrity, and availability needs. Security can be provided by means such as, but not limited to, encryption, access controls, filesystem audits, physically securing the storage media, or any combination thereof as deemed appropriate.






UT Note: Addendum

This list provides specific tasks related to the computing environment at The University of Texas at Austin.


If other alternatives are unavailable, this can be accomplished by installing a SOHO router/firewall in between the network and the host to be protected.

5 Since /tmp is intended to be world writable, creating a separate partition for it can prevent resource exhaustion. Setting nodev prevents users from creating or using block or special character devices. Setting noexec prevents users from running binary executables from /tmp. Setting nosuid prevents users from creating set userid files in /tmp.
6 Multiple partitions are recommended to protect against resource exhaustion conditions if a partition fills up, as well as to allow for the setting of various options on individual partitions to support increased security (e.g. nodev, nosuid, noexec).


Install and use the yum-security plugin.
To install the plugin run:

yum install yum-security

To list all updates that are security relevant, and get a reutrn code on whether there are security updates use:

yum --security check-update

To apply updates that are security relevant use:

yum --security update
13 Setting user/group ownership to root and file permissions to read and write only for root is recommended to prevent non-root users from viewing or changing the boot parameters.


A simple way to disable the GUI is to change the default run level. Edit the file /etc/inittab. Look for the line that contains the following:



Replace the "5" with "3". The line will then read:

17 Core dumps are intended to help determine why a program aborted. They may contain sensitive or confidential data from memory. It is recommended that core dumps be disabled or restricted. The system should be configured to prevent setuid programs from creating core dumps.

Add the following line to the /etc/sysctl.conf file:

kernel.randomize_va_space = 2	


Disable any xinetd services you do not absolutely require by setting "disable=yes" in /etc/xinetd.d/*.

Configure TCP wrappers for access control.
Edit /etc/hosts.deny to include this entry as the first uncommented line in the file: ALL:ALL
Ensure /etc/hosts.allow is edited appropriately to allow the administrator(s) to connect.
Verify that you have disabled any unnecessary startup scripts under /etc, /etc/rc*.d, or /etc/init.d (or startup script directory for your system) and disabled any unneeded services from starting in these scripts.

Unnecessary services can be disabled with:

$ sudo chkconfig off

To check what services are listening use: 

$ lsof 	\| grep '*:' 


$ sudo netstat \--tulp

Much more detailed information regarding services is available in the CIS benchmark documents.

Red Hat also provides a text-based interface for changing startup services: ntsysv

For example, the command

ntsysv \--level 345

configures runlevels 3, 4, and 5.



If no xinetd services are required, disable xinetd altogether:

sudo service xinetd stop; sudo chkconfig xinetd off


RHEL7 comes with firewalld, however iptables may be installed and used instead. This is documented at:

Below is a list of some iptables resources:


If you decide to utilize SSH, the ISO highly recommends the following:

  • Change the port from port 22 to something/anything else. There are scripts online that malicious hackers can use against an SSH server. These scripts almost always only attack port 22 since most people do not change the default port.
  • Use SSH2 (by setting Protocol 2 in the sshd_config file) as it remediates many vulnerabilities from SSH1.
  • Restrict access to the SSH port using a hardware or software firewall.
  • If possible, use keys with passphrase instead of just passwords. To create rsa keys, follow these commands:

    ssh-keygen \--t rsa
    ssh server "mkdir .ssh; chmod 0700 .ssh"
    scp ./ssh/ server:.ssh/authorized_keys2
  • The CIS Solaris Benchmark covers some suggested basic settings to place in the configuration file.
    You may also want to visit the SSL Web site.

INFO is a basic logging level that will capture user login and logout activity. Other logging levels may be used, but may generate more noise. The DEBUG logging level is not recommended for production servers.

35 Do not permit root logins via SSH. If root access over SSH is absolutely necessary, require administrators to authenticate with an individual account first and then use su or sudo. This is to prevent remote brute force attacks against the root user account as well as to create an audit trail of administrative activity in the event of a compromise.


There is a license fee for Tripwire. The Tripwire management console can be very helpful for managing more complex installations.
AIDE is a free tool available from SourceForge.
SamHain is another free tool, as is OSSEC HIDS.



Many resources exist for understanding and configuring SELinux:

SELinux is enabled by default with RHEL systems and should not be disabled unless absolutely necessary.

39 OSSEC is a free, open-source host-based intrusion detection system, which performs log analysis, file integrity checking, and rootkit detection, with real time alerting, in an effort to identify malicious activity. It is available at


ITS Networking operates two stratum 2 NTPv4 (NTP version 4) servers for network time synchronization services for university network administrators.

41 Auditd monitors various system activity, such as system logins, authentications, account modifications, and SELinux denials. These records may help administrators identify malicious activity or unauthorized access.
42 Rsyslog is a third-party package which is intended to replace the standard syslog daemon. The CIS benchmark has several recommendations for configuring rsyslog. Some benefits of rsyslog include transmission of logs over TCP and support for encryption of log data when transmitting over a network.
44 It is highly recommended that logs are shipped from any Category I devices to a service like Splunk, which provides log aggregation, processing, and real-time monitoring of events among many other things. This helps to ensure that logs are preserved and unaltered in the event of a compromise, in addition to allowing proactive log analysis of multiple devices.

Splunk licenses are available through ITS at no charge. ITS also maintains a centrally-managed Splunk service that may be leveraged.


  • Check in /etc/sudoers to see who has sudo rights
  • Check in /etc/groups to see what groups your users belong to
  • Check in /etc/passwd and/or /etc/shadow for blank passwords
  • Check the strength of users' passwords with tools such as John the Ripper
  • Seek approval from IT Owner. Consider using a simple dictionary for easily guessed passwords.
  • Develop a procedure to report and remediate easily guessed passwords.

Ensure the following are set in /etc/pam.d/other:

Warn will report alerts to syslog.


To require strong passwords, in compliance with section 5.18 of the Information Resources Use and Security Policy:

For RHEL 6:

In /etc/pam.d/system-auth, add or change the file as required to read:

password   required retry=3 difok=5 minlen=8 lcredit=-1 dcredit=-1 ocredit=-1
password   sufficient sha512 shadow nullok try_first_pass use_authtok remember=10
password   required
password   required


For RHEL 7:

In /etc/security/pwquality.conf, add:

difok = 5
minlen = 8
minclass = 1
maxrepeat = 0
maxclassrepeat = 0
lcredit = -1
ucredit = 0
dcredit = -1
ocredit = -1
gecoscheck = 1

In /etc/pam.d/system-auth, add or change the file as required to read:

password    required try_first_pass local_users_only retry=3 authtok_type=
password    sufficient sha512 shadow try_first_pass use_authtok remember=10
password    required


Ensure that the terminal security file (for example, /etc/securetty or /etc/ttys) is configured to deny privileged (root) access. On a Red Hat box, this means that no virtual devices (such as /dev/pty*) appear in this file.


The text of the university's official warning banner can be found on the ITS Web site. You may add localized information to the banner as long as the university banner is included.


The text of the university's official warning banner can be found on the ITS Web site. You may add localized information to the banner as long as the university banner is included.


There are few viruses that infect Linux computers; therefore, it is understandable for most Linux servers to have an exception to this rule. See the Operations Manual for information on the exception process.

You may choose any proven anti-virus product. One option is ClamAV.


There are few viruses that infect Linux computers; therefore, it is understandable for most Linux servers to have an exception to this rule. See the Operations Manual for information on the exception process.


There are a variety of methods available to provide encrypted storage. Two good candidates are LUKS and GNUPG (free).

Copyright © 2001-2011 Information Technology Services. All rights reserved.

  • No labels