Configuring a NTP Server

<html><p style=“margin:0em; padding:0em;”>The VM Server, vmserver03, will be acting as a NTP server to the VM Guests.<br /> <br /> You need to edit /etc/ntp.conf using the editor of your choice to tailor things to your needs.</p></html>

sudo vim /etc/ntp.conf

<html><p style=“margin:0em; padding:0em;”>The ntp.conf file on our server is as follows:</p></html>

# /etc/ntp.conf
# Local clock oscillation file
driftfile /var/lib/ntp/ntp.drift
 
# Allow statistics to be logged.
statsdir /var/log/ntpstats/
 
# Logging configuration
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
restrict default kod nomodify notrap nopeer noquery # Deny everybody by default
restrict 127.0.0.1                                  # Allow unrestricted access to self
restrict 10.80.3.0 mask 255.255.255.0 nomodify      # Serve time to local network
 
# NTP servers to syncronise with
server juicebox.lair.lan
 
# Allow localhost to serve as a back-up time server
server 127.127.1.0
fudge 127.127.1.0 stratum 10

<html><p style=“margin:0em; padding:0em;”>Now restart the NTP service to implement the changes.</p></html>

sudo /etc/init.d/ntp restart