apt-get -y install ntp ntpdateThe options passed to ntp daemon are set in /etc/default/ntp file. We are interested to turn off ipv6 for now:
NTPD_OPTS='-4 -g'As well we are going restrict ntp daemon for use ipv4 only (file /etc/ntp.conf):
# By default, exchange time with everybody, but don't # allow configuration. restrict -4 default kod notrap nomodify nopeer noquery #restrict -6 default kod notrap nomodify nopeer noquery # Local users may interrogate the ntp server more # closely. restrict 127.0.0.1 #restrict ::1Restart ntp daemon so the changes take place:
ClientInstall ntpdate package:
apt-get -y install ntpdateYou can sync the client with you ntp server by issuing the following command (I assume your local htp server resolves to ntp.dev.local):
ntpdate -p 2 ntp.dev.localConsider have a look at the following post (you just need to substitute the ntp server name with yours).