====== NTP: ====== ==== Config file: ==== /etc/ntp.conf ==== timedatectl: ==== Gives information on time, date and timezone: timedatectl Local time: Sun 2021-11-21 11:57:23 CET Universal time: Sun 2021-11-21 10:57:23 UTC RTC time: Sun 2021-11-21 10:57:23 Time zone: Europe/Amsterdam (CET, +0100) System clock synchronized: yes NTP service: active RTC in local TZ: no timedatectl --help status Show current time settings show Show properties of systemd-timedated set-time TIME Set system time set-timezone ZONE Set system time zone list-timezones Show known time zones set-local-rtc BOOL Control whether RTC is in local time set-ntp BOOL Enable or disable network time synchronization systemd-timesyncd Commands: timesync-status Show status of systemd-timesyncd show-timesync Show properties of systemd-timesyncd ==== Voorbeeld van ntp.conf: ==== ## Use 'server' for a real NTP server and use 'pool' for ## a pool of servers if the ntp version supports it, ## otherwise define multiple server lines (See: www.pool.ntp.org/en/use.html) ## Added 'iburst' to speed up the initial synchronization. server 172.17.9.58 iburst ## Multiple server configuration is possible: server ntp-time.for.mydomain server otherntp.server.org server ntp.research.gov driftfile /var/lib/ntp/drift/ntp.drift logfile /var/log/ntp ## Key file containing the keys and key identifiers used when operating ## with symmetric key cryptography - disabled #keys /etc/ntp.keys ## Specify the key identifiers which are trusted. trustedkey 1 ## Specify the key identifier to use with the ntpdc utility. requestkey 1 ## mitigate CVE-2013-5211 in case we are running a version before 4.2.7p26 ## N/A for SLES12SP3 GA #disable monitor ## Permit time synchronization with our time source, but do not ## permit the source to query or modify the service on this system. restrict default kod limited nomodify notrap nopeer noquery restrict -6 default kod limited nomodify notrap nopeer noquery ## Permit all access over the loopback interface. This could ## be tightened as well, but to do so would effect some of ## the administrative functions. restrict 127.0.0.1 restrict -6 ::1 ==== Om handmatig een sync te doen: ==== ntpdate -u 10.126.33.101 output: 29 Jun 09:45:03 ntpdate[1649]: step time server 10.126.33.101 offset 126.149871 sec ==== Apply changes: ==== service ntpd start or systemctl start ntpd