NTP / Chrony

Time synchronization with chronyd, hardware clock management, and NTP security.

Overview

RHEL 10 uses chrony as the default NTP implementation. It provides accurate time synchronization and handles intermittent network connections better than classic ntpd.

# Install chrony
sudo dnf install -y chrony
sudo systemctl enable --now chronyd

# Check status
sudo chronyc tracking
sudo chronyc sources -v

# Allow NTP through firewall
sudo firewall-cmd --permanent --add-service=ntp
sudo firewall-cmd --reload

Configuration

# Edit /etc/chrony.conf
# Replace default servers with your preferred NTP sources:
# server time.example.com iburst
# server time2.example.com iburst
# server time3.example.com iburst

# Allow local clients to query (for internal NTP server)
# allow 10.0.0.0/24

# Act as NTP server for LAN
sudo tee -a /etc/chrony.conf <<'EOF'
local stratum 10
allow 10.0.0.0/24
EOF

sudo systemctl restart chronyd

Hardware Clock

# Check hardware clock
chronyc rtcshow

# Sync hardware clock to system time
sudo hwclock --systohc

# Set hardware clock to UTC (default on RHEL)
cat /etc/adjtime
# Last line should be: UTC

Troubleshooting

# Force immediate synchronization (if offset is large)
sudo chronyc makestep

# Check drift rate
sudo chronyc tracking | grep 'System time'

# View chrony logs
sudo journalctl -u chronyd

# Test NTP reachability
chronyc -n track
chronyc -n sources