NETW 0014 - Week 2, Day 3 — NTPsec Server & Client

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/23

encourage image

There's no tags or description

Looks like no tags are added yet.

24 Terms

1
New cards

S1's auth log shows a failed SSH attempt at 14:32. S2's log shows the same source connecting at 14:28. Are these related?

you cannot tell unless the clocks agree

2
New cards

What does timedatectl show?

shows both, the time zone, and whether a synchroniser is active

3
New cards

How would you set the timezone to Winnipeg?

timedatectl set-timezone America/Winnipeg

4
New cards

What can a full NTP implementation do compared to a small one?

A full NTP implementation can serve time and discipline the clock accurately: classic ntpd, chrony and NTPsec, a security-hardened, much smaller fork of ntpd that adds Network Time Security (NTS) for authenticated time.

A small SNTP client that steps or slews the clock and cannot serve time, such as systemd-timesyncd (Ubuntu's default)

5
New cards

What is the configuration of NTPsec?

/etc/ntpsec/ntp.conf

6
New cards

What is the difference between NTPsec and classic ntpd?

NTPsec is stricter than classic ntpd, so a directive copied from an older tutorial may be rejected or silently ignored

7
New cards

On Ubuntu Server, what does installing ntpsec do?

installing ntpsec removes the systemd-timesyncd package for you (both provide time-daemon, and apt lists the removal): check with dpkg -l systemd-timesyncd and sudo ss -ulnp | grep 123.

8
New cards

What does timedatectl timesync-status do?

shows the server and stratum it uses

9
New cards

What does pool do?


expands to several servers (resilient) versus a fixed server

10
New cards

What does iburst do?

speeds the first sync

11
New cards

What does driftfile do?

remembers the clock's error

12
New cards

Why is query access is kept tight?

Historically open NTP servers answering monitoring queries were abused for amplification attacks

13
New cards

What is restrict?

restrict is an access list for the NTP service. Lines match by address and mask, the most specific match wins, and flags allow or deny actions: serving time, answering ntpq queries, being modified, being used as a peer. A default that denies everything plus specific permits for your clients is the safest shape; sources you sync from need to be allowed to reply. The NTPsec man page for the configuration file lists the flags it supports

14
New cards

What does the tally code * mean?

selected

15
New cards

What does the tally code + mean?

candidate

16
New cards

What does the tally code -/x mean?

rejected

17
New cards

When does a synchronised server shows a *?

Within minutes

18
New cards

How do you interpret ntpq -p?

the show ntp associations of Linux: remote with a tally code (* selected, + candidate, -/x rejected), refid (the source's own upstream), st stratum, t type, when, poll, reach (an octal register of the last eight polls: 377 means all succeeded), then delay, offset and jitter

19
New cards

What is the likely cause and fix for the following issue: Edited /etc/ntp.conf but nothing changed

On 24.04 NTPsec reads /etc/ntpsec/ntp.conf

Edit the NTPsec file and restart the ntpsec service

20
New cards

What is the likely cause and fix for the following issue: NTPsec will not start: address already in use

another time daemon owns UDP 123 (the ntpsec install removes timesyncd on Server)

sudo ss -ulnp | grep 123 shows the owner; stop and remove or disable it

21
New cards

What is the likely cause and fix for the following issue: ntpq -p never shows a *

Outbound UDP 123 blocked, a restrict line blocks the upstream replies, or not enough time has passed

Wait a few minutes; check the journal; capture on eth1 to see whether replies return

22
New cards

What is the likely cause and fix for the following issue: S2 still shows an old server or stratum

timesyncd drop-in not read, or not restarted

Restart systemd-timesyncd; confirm with timedatectl timesync-status

23
New cards

What is the likely cause and fix for the following issue: S2 stops syncing after the restrict change

The policy blocks S2's address, or ignores everything including replies

Allow S2's address and the upstream sources; restart and recheck with ntpq and the journal

24
New cards

What is the likely cause and fix for the following issue: The host is still served after restricting to S2

A broader line (the whole LAN) still matches, or the old policy is still loaded

Review the lines for the most specific match; restart ntpsec