NTP Time Synchronization
NTP (Network Time Protocol) keeps your SafeSquid server’s clock synchronized with enterprise time sources. Accurate time is critical for SSO/Kerberos authentication, TLS certificate validation, and audit log timestamps. Why you need this: Clock drift breaks Kerberos (requires ≤5 minutes skew), causes TLS certificate errors, and makes log correlation impossible.Prerequisites
:::note Before You Start- Linux host with root/sudo access
- Enterprise NTP servers or domain controllers providing time
- Firewall allows UDP port 123 outbound
- Network connectivity to NTP sources
Installation and Configuration
1. Install Time Synchronization Service
Prefer chrony (modern, faster sync): Debian/Ubuntu:ntpd instead of chrony, install with:
/etc/ntp.conf.
:::
2. Configure Time Sources
Edit chrony configuration:- Debian/Ubuntu:
/etc/chrony/chrony.conf - RHEL/CentOS:
/etc/chrony.conf
- server … iburst — Speeds up initial synchronization
- makestep 1.0 3 — Allows step (immediate) corrections if offset >1 second, up to 3 times
- driftfile — Saves clock frequency for faster sync after restart
- logdir — Where chrony logs are stored
3. Enable and Start Chrony
active and enabled.
4. Validate Synchronization
Check tracking status:- Reference ID: Your NTP server
- Stratum: Lower is better (1-4 typical)
- System time offset: Should be within milliseconds (< 0.1 seconds)
Check source status:
- * (asterisk) — Current best source (should have at least one)
- Reach — Should be
377(all recent polls successful) - Last sample — Time offset in microseconds/milliseconds
5. Align SafeSquid Authentication
For SSO/Kerberos with Active Directory: Verify time skew is within 5 minutes of the domain controller:Verify NTP is Working
Check Synchronization Status
- Reference ID: Shows your NTP server (not
0.0.0.0) - System time offset: < 0.1 seconds
- Stratum: 2-4 (depending on your NTP server)
View Source Statistics
Monitor Logs
Troubleshooting
Still not working?
-
Test NTP server connectivity:
Should show offset.
-
Check chrony configuration:
-
Force time sync:
-
Check logs:
Production Best Practices
-
Use at least 3 NTP sources for redundancy:
-
For Active Directory, prefer domain controllers:
-
Monitor time drift with Monit:
Add to
/etc/monit/conf.d/chrony: -
Alert on large offsets:
- Configure monitoring to alert if offset >1 second
- Investigate VM host time sync conflicts
- Check for network latency to NTP servers
Source register
Next Steps
- Monit — Monitor chronyd and auto-restart if needed
- BIND — DNSSEC validation requires accurate time
- Authentication — Configure SSO/Kerberos (requires NTP)
- SSL Inspection — TLS certificate validation requires accurate time

