Aqbeż għall-kontenut

Konfigurazzjoni ta’ server NTP fuq il-komponent Mediation Controller

L-użu ta’ server NTP jagħmilha possibbli li tissinkronizza l-arloġġi tal-kompjuters tiegħek ma’ dak tas-server NTP.
Din id-dokumentazzjoni tkopri l-konfigurazzjoni ta’ server NTP għas-server Mediation Controller ta’ CyberElements Bastion.

Prerekwiżiti

Huma meħtieġa aċċess SSH jew mill-konsol + il-possibbiltà li tuża l-kont tas-superutent fuq il-kompjuter. Barra minn hekk, trid tiżgura li s-server Mediation Controller għandu l-port UDP 123 miftuħ lejn is-server(s) NTP mixtieqa.

Il-konfigurazzjoni tas-server(s) NTP għas-server Mediation Controller ta’ CyberElements Bastion hija stabbilita fil-fajl /etc/ntpsec/ntp.conf. B’mod default, is-servers ta’ Debian jintużaw bħala servers NTP.

Biex tippersonalizza s-server(s) NTP li għandhom jintużaw, ibda billi tikkummenta (żid # fil-bidu tal-linja) l-użu tas-servers NTP ta’ Debian fil-linji 34-37:

31
32
33
34
35
36
37
# pool.ntp.org maps to about 1000 low-stratum NTP servers.  Your server will
# pick a different set every time it starts up.  Please consider joining the
# pool: <http://www.pool.ntp.org/join.html>
#pool 0.debian.pool.ntp.org iburst
#pool 1.debian.pool.ntp.org iburst
#pool 2.debian.pool.ntp.org iburst
#pool 3.debian.pool.ntp.org iburst

Imbagħad, mil-linja 27, żid server NTP wieħed jew aktar. Għandu jiżdied server wieħed għal kull linja fil-format li ġej: server IP_ou_DNS_NTP.

Eżempju

Biex jintużaw is-servers ntp1.systancia.local u 172.16.20.20, il-fajl jiġi modifikat kif ġej:

26
27
28
29
30
31
32
33
34
35
36
37
38
39
# Specify one or more NTP servers.
server ntp1.systancia.local
server 172.16.20.20

# Public NTP servers supporting Network Time Security:
# server time.cloudflare.com nts

# pool.ntp.org maps to about 1000 low-stratum NTP servers.  Your server will
# pick a different set every time it starts up.  Please consider joining the
# pool: <http://www.pool.ntp.org/join.html>
#pool 0.debian.pool.ntp.org iburst
#pool 1.debian.pool.ntp.org iburst
#pool 2.debian.pool.ntp.org iburst
#pool 3.debian.pool.ntp.org iburst

Informazzjoni

Aktar informazzjoni dwar il-konfigurazzjoni tal-fajl tista’ tinkiseb bil-kmand man ntp.conf.

Twissija!

Jekk tiddefinixxi inqas minn 3 servers NTP, il-parametru minsane fil-linja 24 irid jitnaqqas għan-numru ta’ servers NTP.
Mingħajr din il-modifika, ntpsec mhux se jikkoreġi l-ħin tal-kompjuter.

Eżempju

Jekk ikun iddefinit server NTP wieħed biss, il-linja 24 trid tiġi modifikata sabiex il-valur ta’ minsane ikun 1:

24
tos minclock 4 minsane 1

Jekk nieħdu l-eżempju tal-konfigurazzjoni ta’ hawn fuq b’żewġ servers NTP ikkonfigurati, u għalhekk valur ta’ minsane ta’ 2, ikollna s-settings globali li ġejjin:

22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# Comment this out if you have a refclock and want it to be able to discipline
# the clock by itself (e.g. if the system is not connected to the network).
tos minclock 4 minsane 2

# Specify one or more NTP servers.
server ntp1.systancia.local
server 172.16.20.20

# Public NTP servers supporting Network Time Security:
# server time.cloudflare.com nts

# pool.ntp.org maps to about 1000 low-stratum NTP servers.  Your server will
# pick a different set every time it starts up.  Please consider joining the
# pool: <http://www.pool.ntp.org/join.html>
#pool 0.debian.pool.ntp.org iburst
#pool 1.debian.pool.ntp.org iburst
#pool 2.debian.pool.ntp.org iburst
#pool 3.debian.pool.ntp.org iburst

Wara li tissejvja l-konfigurazzjoni l-ġdida, is-servizz ntpsec irid jerġa’ jinbeda:

1
systemctl restart ntpsec