I am running a Ubuntu 18.04 server with ntp installed. I need NTP to synchronize time in ordet to let a Munge-service to work correctly.
My firewall is not enabled, however I have added rules to allow ntp.
Both the server and client yields that the udp-port 123 is open.
Thus running the following commands at the instances:
Server:sudo nmap -sU -p123 192.168.1.1
Client:sudo nmap -sU -p123 192.168.1.1
Results in a response that the udp port 123 is "open|filtered" and used by the ntp-service.
I have the following setup:
ntp.conf @ NTP-server:
# /etc/ntp.conf, configuration for ntpd; see ntp.conf(5) for help
driftfile /var/lib/ntp/ntp.drift
leapfile /usr/share/zoneinfo/leap-seconds.list
statistics loopstats peerstats clockstats
filegen loopstats file loopstats type day enable
filegen peerstats file peerstats type day enable
filegen clockstats file clockstats type day enable
restrict -4 default kod notrap nomodify nopeer noquery limited
restrict -6 default kod notrap nomodify nopeer noquery limited
restrict 127.0.0.1
restrict ::1
restrict source notrap nomodify noquery
restrict 192.168.1.0 mask 255.255.255.0 notrust
broadcast 192.168.1.1
disable auth
ntp.conf @ clients:
# /etc/ntp.conf, configuration for ntpd; see ntp.conf(5) for help
driftfile /var/lib/ntp/ntp.drift
leapfile /usr/share/zoneinfo/leap-seconds.list
statistics loopstats peerstats clockstats
filegen loopstats file loopstats type day enable
filegen peerstats file peerstats type day enable
filegen clockstats file clockstats type day enable
server 192.168.1.1 prefer
restrict default notrust nomodify nopeer
restrict 192.168.1.1
After stopping and starting the ntp-service (at the server) the following tcpdump command is typed at the client:
sudo tcpdump -i enp5s0f1 udp port 123 -vvv
(As a sidenote, if any one struggles with the same issue, I noticed that the tcpdump command first yielded that there where a bad checksum in recived udp-package, but after setting offload (for checksumming) of both the rx and tx to off
, of the connect ethernet-device, (via ethtool
), the bad checksum-error where rectified).
Results in an output (recieved after quite some time) stating that the clocks are not synchronized.
Running (@ the client) ntpdate -u 192.168.1.1
yields that "no servers suitable for synchronization found".
Running the ntpq -pn
at the server yields that the
refid
is in state .BCST
, but at the client it is noted as .INIT.
and will not be changed (after several hours of waiting).
What am I missing out on? Any help is much appreciated. Regards, P.