OpenNTPD Setup

Install

debian

apt purge ntp
apt install ntpdate openntpd adjtimex

source

ls -lF /var/log/packages/ | grep ntp # empty
ls -lF /var/log/packages/ | grep chrony # empty

git clone https://github.com/openntpd-portable/openntpd-portable.git
cd openntpd-portable/
./autogen.sh
./configure --sysconfdir=/etc --localstatedir=/var
make
make install

Setup

cp -pi /etc/openntpd.conf /etc/openntpd.conf.dist
vi /etc/openntpd.conf

# https://www.pool.ntp.org/zone/md
servers md.pool.ntp.org

# cluser farm bind
listen on 10.3.3.3

# cluster farm peers
server 10.3.3.1
server 10.3.3.2

Ready to go

start

ntpd -nf /etc/openntpd.conf
ntpd -f /etc/openntpd.conf

status

pgrep -a ntpd
ntpctl -s status
ntpctl -s peers

ls -lF /var/db/ntpd.drift
cat /var/db/ntpd.drift

stop

pkill ntpd

Additional notes

once everything is fine, eventually sync the hw clock

ls -lF /etc/localtime
hwclock --utc --systohc

Resources

https://slackbuilds.org/repository/15.0/network/openntpd/

http://www.openntpd.org/portable.html

https://man.openbsd.org/ntpd.conf

https://www.ntppool.org/en/

troubles

https://superuser.com/questions/1110383/openntpd-complains-about-an-empty-drift-file-on-archlinux

https://github.com/openntpd-portable/openntpd-portable/issues/46

https://github.com/openntpd-portable/openntpd-portable/issues/25


HOME | GUIDES | LECTURES | LAB | SMTP HEALTH | HTML5 | CONTACT
Copyright © 2024 Pierre-Philipp Braun