Nethence Newdoc Olddoc Lab Your IP BBDock  

Setting up NTP (client and/or server)

Requirements

Check your timezone,

ls -lhF /etc/localtime

Make sure the ntpdate and ntp{d} packages are installed.

Manual sync for a starters

Setting up as client

Configure the NTP daemon e.g.,

cd /etc/
mv -i ntp.conf ntp.conf.dist
sed '/^$/d;/^#/d;' ntp.conf.dist > ntp.conf
vi /etc/ntp.conf

server ntp.obspm.fr iburst prefer
#server ntp1.dedibox.fr

Start the NTP daemon and check with,

ntpq -p
ntpdc -c sysinfo

Notes.

Setting up as server

Simply add a restrict line without nopeer noquery against the subnetwork you wanna allow,

restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap

Don’t forget to setup the local clock as a fail-over, if internet connection goes down, so you still provide the service,

server  127.127.1.0 # local clock
fudge   127.127.1.0 stratum 10

 References


Home | GitHub | Donate