Part 6: Security layer
30. Check the clock#
Why: logs, backups, updates and secure connections all depend on the right time. A wrong clock makes logs useless and can break updates. Time: 5 minutes.
Step 1: Switch on automatic time#
Type on: the server
sudo timedatectl set-ntp true
sudo timedatectl set-timezone Europe/Paris
timedatectl
Use your own time zone. timedatectl list-timezones shows them all.
You want:
System clock synchronized: yes
NTP service: active
It can take a minute to say yes.
Step 2: Only if it says "NTP not supported"#
There's no time service installed. Install the standard one and repeat step 1:
Type on: the server
sudo apt install systemd-timesyncd
Done when: System clock synchronized: yes.
Next: 31. Fail2ban