Blueprints · Server Hardening
Beginner
10 min · Linux
Chrony time sync
Stages a chrony config that uses the distro pool and does not serve time to the internet.
Baked-in protections
- The host syncs as a client
- The server is not opened as a public NTP reflector
- The check only prints timedatectl
Step 1 · conf
chrony snippet
/root/portgate-blueprints/chrony-client.conf
Merge this with the distro chrony.conf. Do not delete the pool your image already uses unless you mean to.
driftfile /var/lib/chrony/drift makestep 1.0 3 rtcsync # Do not add an allow line. This host is a client.
Step 2 · bash
Read-only check
/root/portgate-blueprints/time-check.sh
Prints status. It does not change the service.
#!/bin/sh set -eu timedatectl || date -u