Léim go dtí an t-ábhar

Freastalaí NTP a chumrú ar an bhfreastalaí Mediation Controller

Ligeann úsáid freastalaí NTP duit cloig do ríomhairí a shioncrónú le clog an fhreastalaí NTP.
Clúdaíonn an doiciméadú seo cumraíocht freastalaí NTP don fhreastalaí Mediation Controller CyberElements Bastion.

Réamhriachtanais

Tá rochtain SSH nó rochtain chonsóil + an cumas cuntas an tsárúsáideora a úsáid ar an ríomhaire ag teastáil. Ina theannta sin, ní mór duit a chinntiú go bhfuil port UDP 123 oscailte ar an bhfreastalaí Mediation Controller chuig an bhfreastalaí NTP nó chuig na freastalaithe NTP is mian leat.

Socraítear cumraíocht an fhreastalaí NTP nó na bhfreastalaithe NTP don fhreastalaí Mediation Controller CyberElements Bastion sa chomhad /etc/ntpsec/ntp.conf. De réir réamhshocraithe, úsáidtear freastalaithe Debian mar fhreastalaithe NTP.

Chun an freastalaí NTP nó na freastalaithe NTP atá le húsáid a shaincheapadh, tosaigh trí úsáid fhreastalaithe NTP Debian ar línte 34-37 a chur ina nóta tráchta (cuir # ag tús na líne):

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

Ansin, ag tosú ag líne 27, cuir freastalaí NTP amháin nó níos mó leis. Ba cheart freastalaí amháin a chur leis in aghaidh na líne, san fhormáid seo a leanas: server IP_ou_DNS_NTP.

Sampla

Chun na freastalaithe ntp1.systancia.local agus 172.16.20.20 a úsáid, d'athrófaí an comhad mar seo a leanas:

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

Faisnéis

Is féidir tuilleadh faisnéise faoi chumraíocht an chomhaid a fháil leis an ordú man ntp.conf.

Rabhadh!

Má shainmhíníonn tú níos lú ná 3 fhreastalaí NTP, ní mór an paraiméadar minsane ar líne 24 a laghdú go dtí líon na bhfreastalaithe NTP.
Gan an t-athrú seo, ní cheartóidh ntpsec am an ríomhaire.

Sampla

Mura sainmhínítear ach freastalaí NTP amháin, ní mór líne 24 a athrú ionas gurb é 1 luach minsane:

24
tos minclock 4 minsane 1

Ag úsáid an tsampla cumraíochta thuas, le dhá fhreastalaí NTP cumraithe, agus dá bhrí sin luach minsane de 2, bheadh na socruithe domhanda seo a leanas againn:

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

Tar éis duit an chumraíocht nua a shábháil, ní mór an tseirbhís ntpsec a atosú:

1
systemctl restart ntpsec