Specify Additional Remote NTP Servers
An XCCDF Rule
Description
Depending on specific functional requirements of a concrete
production environment, the Red Hat Enterprise Linux CoreOS 4 system can be
configured to utilize the services of the chronyd
NTP daemon (the
default), or services of the ntpd
NTP daemon. Refer to
https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/system_administrators_guide/ch-configuring_ntp_using_the_chrony_suite
for more detailed comparison of the features of both of the choices, and for
further guidance how to choose between the two NTP daemons.
Additional NTP servers can be specified for time synchronization. To do so,
perform the following:
- if the system is configured to use the
chronyd
as the NTP daemon (the default), edit the file/etc/chrony.conf
as follows, - if the system is configured to use the
ntpd
as the NTP daemon, edit the file/etc/ntp.conf
as documented below.
server ntpserver
Note that if the remediation shipping with this content is being used, the MachineConfig shipped does not include reference NTP servers to point to. It is up to the admin to set these which will vary depending on the cluster's requirements.
The aforementioned remediation does include the directory /etc/chrony.d
which would allow the creation of configuration files to set these servers.
pool 2.rhel.pool.ntp.org iburst server 0.rhel.pool.ntp.org minpoll 4 maxpoll 10 server 1.rhel.pool.ntp.org minpoll 4 maxpoll 10 server 2.rhel.pool.ntp.org minpoll 4 maxpoll 10 server 3.rhel.pool.ntp.org minpoll 4 maxpoll 10This could be done with to the following manifest:
apiVersion: machineconfiguration.openshift.io/v1 kind: MachineConfig metadata: labels: machineconfiguration.openshift.io/role: master name: 75-master-chrony-servers spec: config: ignition: version: 3.1.0 storage: files: - contents: source: data:,pool%202.rhel.pool.ntp.org%20iburst%0A%0Aserver%200.rhel.pool.ntp.org%20minpoll%204%20maxpoll%2010%0Aserver%201.rhel.pool.ntp.org%20minpoll%204%20maxpoll%2010%0Aserver%202.rhel.pool.ntp.org%20minpoll%204%20maxpoll%2010%0Aserver%203.rhel.pool.ntp.org%20minpoll%204%20maxpoll%2010 mode: 0600 path: /etc/chrony.d/10-rhel-pool-and-servers.conf overwrite: trueNote that this needs to be done for each
MachineConfigPool
Rationale
Specifying additional NTP servers increases the availability of accurate time data, in the event that one of the specified servers becomes unavailable. This is typical for a system acting as an NTP server for other systems.
- ID
- xccdf_org.ssgproject.content_rule_chronyd_or_ntpd_specify_multiple_servers
- Severity
- Medium
- References
- Updated
Remediation - Kubernetes Patch
---
apiVersion: machineconfiguration.openshift.io/v1
kind: MachineConfig
spec:
config:
ignition: