Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 4896

Troubleshooting • NTP server client not working

$
0
0
Raspbeery pi (server)

Code:

# /etc/ntpsec/ntp.conf, configuration for ntpd; see ntp.conf(5) for helpdriftfile /var/lib/ntpsec/ntp.driftleapfile /usr/share/zoneinfo/leap-seconds.list# To enable Network Time Security support as a server, obtain a certificate# (e.g. with Let's Encrypt), configure the paths below, and uncomment:# nts cert CERT_FILE# nts key KEY_FILE# nts enable# You must create /var/log/ntpsec (owned by ntpsec:ntpsec) to enable logging.#statsdir /var/log/ntpsec/#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# This should be maxclock 7, but the pool entries count towards maxclock.tos maxclock 11# 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 3# Specify one or more NTP servers.# Public NTP servers supporting Network Time Security:# server  nts#  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: <https://www.pool.ntp.org/join.html># pool  iburst# pool  iburst# pool  iburst# pool  iburstserver  iburstserver  iburstserver  iburstserver  iburstserver fudge  stratum 10# Access control configuration; see /usr/share/doc/ntpsec-doc/html/accopt.html# for details.## Note that "restrict" applies to both servers and clients, so a configuration# that might be intended to block requests from certain clients could also end# up blocking replies from your own upstream servers.# By default, exchange time with everybody, but don't allow configuration.#restrict default kod nomodify nopeer noquery limited# Local users may interrogate the ntp server more closely.restrict restrict ::1restrict 192.168.0.2 mask 255.255.255.0 notrustbroadcast time.cloudflare.compool.ntp.org0.debian.pool.ntp.org1.debian.pool.ntp.org2.debian.pool.ntp.org3.debian.pool.ntp.org0.de.pool.ntp.org1.de.pool.ntp.org2.de.pool.ntp.org3.de.pool.ntp.org127.127.1.0127.127.1.0127.0.0.1192.168.0.255
Rpi (client)

Code:

# /etc/ntp.conf, configuration for ntpd; see ntp.conf(5) for helpdriftfile /var/lib/ntp/ntp.drift# Leap seconds definition provided by tzdataleapfile /usr/share/zoneinfo/leap-seconds.list# Enable this if you want statistics to be logged.#statsdir /var/log/ntpstats/statistics loopstats peerstats clockstatsfilegen loopstats file loopstats type day enablefilegen peerstats file peerstats type day enablefilegen clockstats file clockstats type day enable# Specify one or more NTP servers.# Use servers from the NTP Pool Project. Approved by Ubuntu Technical Board# on 2011-02-08 (LP: #104525). See  for# more information.#pool  iburst#pool  iburst#pool  iburst#pool  iburstserver  iburstserver fudge  stratum 10# Use Ubuntu's ntp server as a fallback.pool # Access control configuration; see /usr/share/doc/ntp-doc/html/accopt.html for# details.  The web page <http://support.ntp.org/bin/view/Support/AccessRestrictions># might also be helpful.## Note that "restrict" applies to both servers and clients, so a configuration# that might be intended to block requests from certain clients could also end# up blocking replies from your own upstream servers.# By default, exchange time with everybody, but don't allow configuration.restrict -4 default kod notrap nomodify nopeer noquery limitedrestrict -6 default kod notrap nomodify nopeer noquery limited# Local users may interrogate the ntp server more closely.restrict restrict ::1# Needed for adding pool entries#restrict source notrap nomodify noquery# Clients from this (example!) subnet have unlimited access, but only if# cryptographically authenticated.#restrict 192.168.123.0 mask 255.255.255.0 notrust# If you want to provide time to your local subnet, change the next line.# (Again, the address is an example only.)#broadcast # If you want to listen to time broadcasts on your local subnet, de-comment the# next lines.  Please do this only if you trust everybody on the network!disable authbroadcastclienthttp://www.pool.ntp.org/join.html0.ubuntu.pool.ntp.org1.ubuntu.pool.ntp.org2.ubuntu.pool.ntp.org3.ubuntu.pool.ntp.org192.168.0.2127.127.1.0127.127.1.0ntp.ubuntu.com127.0.0.1192.168.123.255
What could be wrong. I checked firewall rules and I am also able to ping it but time ain't syncing :(

Statistics: Posted by ishaan2479 — Wed May 08, 2024 2:58 pm



Viewing all articles
Browse latest Browse all 4896

Trending Articles