2.2.1.2 Ensure ntp is configured (Scored)

Level 1 - Server 
Level 1 - Workstation

ntp is a daemon which implements the Network Time Protocol (NTP). It is designed to synchronize system clocks across a variety of systems and use a source that is highly accurate. More information on NTP can be found at http://www.ntp.org. ntp can be configured to be a client and/or a server.

This recommendation only applies if ntp is in use on the system.

If ntp is in use on the system proper configuration is vital to ensuring time synchronization is working properly.

Run the following command and verify output matches:

# grep "^restrict" /etc/ntp.conf 
restrict -4 default kod nomodify notrap nopeer noquery 
restrict -6 default kod nomodify notrap nopeer noquery

The -4 in the first line is optional and options after default can appear in any order. Additional restriction lines may exist.
Run the following command and verify remote server is configured properly:

# grep "^server" /etc/ntp.conf 
server <remote-server>

Multiple servers may be configured.

Run the following commands and verify that -u ntp:ntp is included in OPTIONS or ExecStart as listed:

# grep "^OPTIONS" /etc/sysconfig/ntpd 
OPTIONS="-u ntp:ntp" 
# grep "^ExecStart" /usr/lib/systemd/system/ntpd.service 
ExecStart=/usr/sbin/ntpd -u ntp:ntp $OPTIONS

Additional options may be present.

Add or edit restrict lines in /etc/ntp.conf to match the following:

restrict -4 default kod nomodify notrap nopeer noquery 
restrict -6 default kod nomodify notrap nopeer noquery

Add or edit server lines to /etc/ntp.conf as appropriate:

server <remote-server>

Add or edit the OPTIONS in /etc/sysconfig/ntpd to include -u ntp:ntp:

OPTIONS="-u ntp:ntp"
  • centos7/2/2/1/2.txt
  • Last modified: 2017/05/05 17:32
  • by Piotr K┼éoczewski