=====Configuring a NTP Client on a Virtual Machine=====
Again, you need to edit /etc/ntp.conf using the editor of your choice to tailor things to your needs.
The ntp.conf file on our client is as follows:
# /etc/ntp.conf
# Disable the panic threshold to allow irregular clock offsets
tinker panic 0
# 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
# NTP servers to syncronise with
server vmserver03.student.lab
The main difference between our client and our server ntp.conf files is that the client file does not have a restrict directive that allows it to serve time to other systems. It also does not look to itself as a server.
We need to do some additional configuration before we restart the NTP service to apply the changes on our virtual macines.
Because the NTP clients for the purposes of this portfolio will be used on Xen Virtual Machines, a few special configuration enhancements need to be made. The first, is the line tinker panic 0 from our client version of the ntp.conf. This allows the NTP client to update from the NTP server, regardless of differences in current system time -- there are instances where the VM will begin adjusting it's clock automatically due to various system errors. The other requirement is to create a step-tinkers file and place it in /etc/ntp directory. (You may need to create this directory as it is not created by default as part of the installation process for NTP.)
# /etc/ntp/step-tinkers
vmserver03.student.lab
\\
Restart the NTP service to implement the changes.