Tag Archives: NTP

Setting Network Time Synchronisation on the Base

7 Nov

OK, now the set the Network Time Synchronisation on the Base…

I am going to use the free Australian NTP servers.

I’m using the following steps I’ve ripped from a previous implementation plan that I wrote using Turnkey LAMP.

Steps:

  1. Login to the Base as “root” using PuTTY (that allows copyandpaste into the terminal window).
  2. Run the command “(apt-get update && apt-get install ntpdate)”.
  3. Update the NTP configuration file using the following command (by copypaste the following, including the brackets into your terminal session):

(
cat << EOF > /etc/ntp.conf
# cope with large time drifts (useful in VM scenarios)
tinker panic 0

# ntp servers
server 0.au.pool.ntp.org
server 1.au.pool.ntp.org
server 2.au.pool.ntp.org
server 3.au.pool.ntp.org
###server 0.pool.ntp.org
###server 1.pool.ntp.org
###server 2.pool.ntp.org
###server 3.pool.ntp.org

# drift file
driftfile /var/lib/ntp/ntp.drift

# Enable this if you want statistics to be logged.
#statsdir /var/log/ntpstats/

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

# 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
restrict -6 default kod notrap nomodify nopeer noquery

# Local users may interrogate the ntp server more closely.
restrict 127.0.0.1
restrict ::1

# If you want to provide time to your local subnet, change the next line.
# (Again, the address is an example only.)
#broadcast 192.168.123.255

# 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 auth
#broadcastclient
EOF
) && cat /etc/ntp.conf

  1. Verify NTP is running using the command “(ps -ef | grep ntpd | grep -v grep)”. One line should return showing the NTP process currently running.

 

 

 

Advertisements
%d bloggers like this: