Installing NTP on Debian 7.5

Network Time Protocol (NTP) is a protocol for synchronizing clocks of computer systems over packet-switched, variable-latency data networks and uses UDP port 123 as its transport layer.

Using NTP is a way to keep our system clock set correctly and works by contacting a number of servers around the world, asking them for the time and then calculating what the correct local time is from their responses.

Installing NTP server

apt-get install ntp ntpdate

Configuring NTP server

The configuration of NTP server is defined in the /etc/ntp.conf file.

broadcast

To broadcast the time to a local network, we set the broadcast network address.

# If you want to provide time to your local subnet, change the next line.
broadcast 192.168.100.255

In the example above, we will be broadcasting network time on the 192.168.100.255 network.

interface

By default, NTP listens on all network interfaces of the server. To limit the network interfaces that NTP would be available on, we add the following to the configuration file.

interface ignore wildcard
interface listen 192.168.100.12

In the example above, we will be listening for NTP requests on UDP port 123 on the 192.168.100.12 IP address.

Advertisements

One thought on “Installing NTP on Debian 7.5

Comments are closed.