Created
August 2, 2022 18:26
-
-
Save akhepcat/d19d271ee268aad7b0294ae496229f04 to your computer and use it in GitHub Desktop.
sanitized config file for ntp+gpsd using ArduSimple RTK-2B on pi3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /etc/ntpsec/ntp.conf, configuration for ntpd; see ntp.conf(5) for help | |
# Drift file etc. | |
# Ensure that the directory exists, and is writable by whichever user | |
# the ntpd daemon runs as. | |
driftfile /var/lib/ntpsec/ntp.drift | |
leapfile /usr/share/zoneinfo/leap-seconds.list | |
# Enable this if you want statistics to be logged. | |
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 | |
logconfig =syncall +clockall +peerall +sysall | |
logfile /var/log/ntpsec/ntpd.log | |
# Prefer the precise clock at unit 1 over the imprecise one at unit 0. | |
# GPS PPS reference (NTP1) (kernel PPS driver, aka ATOM(ic) ) | |
# refclock shm unit 1 refid PPS | |
server 127.127.22.0 minpoll 0 maxpoll 4 prefer | |
fudge 127.127.22.0 refid PPS time1 +0.001 stratum 0 flag3 1 | |
# GPS Serial data reference (NTP0) via SHM(28) or NMEA(20 - see mode on server) gpsd driver | |
server 127.127.28.0 minpoll 0 maxpoll 4 iburst # mode 65552 | |
fudge 127.127.28.0 time1 +0.112 refid GPS stratum 1 flag4 1 flag1 1 # average offset for the MSgps puck is 11.2271 seconds in SiRF mode; use NMEA mode, ~340ms ! | |
### "maxpoll 5" works around linux ARP cache flush timeout being 4 seconds | |
### prior to the standard poll time of 64 seconds. Oops. | |
### keep it constant at 32 seconds with minpoll 5. (2 ^ 5 == 32) | |
server 192.168.1.1 iburst minpoll 5 maxpoll 5 key 1 | |
# NTP us pool | |
# pool us.pool.ntp.org iburst minpoll 5 maxpoll 5 | |
# | |
# NIST IPv6 clock | |
#server 2610:20:6f97:97::6 iburst minpoll 5 maxpoll 5 prefer # time-e-wwv.nist.gov | |
# path for key file | |
keys /etc/ntpsec/ntp.keys | |
trustedkey 1 2 3 4 5 6 7 8 9 10 # trusted peer keys | |
controlkey 10 # key for accessing server variables | |
# By default, exchange time with everybody, but don't allow configuration. | |
restrict default kod limited nomodify nopeer noquery | |
restrict -6 default kod limited nomodify nopeer noquery | |
# Local users may interrogate the NTP server more closely. | |
restrict 127.0.0.1 | |
restrict ::1 | |
restrict 192.168.0.0/23 notrust | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment