Installing and configuring a Linux NTP server

Blog entry under construction

Configure your own internal dedicated NTP server

This article can be standalone (Part 1) or as a precursor to my other Active directory time sync article (Part 2):

For our purposes we’ll be using Ubuntu server.  I’ll be using 12.04  (LTS)

The tutorial should apply to most Debian based distributions. Other Linux distros should have very similar configuration setting might use a different package management than apt-get and not have sudo configured.


Part  1. Install and configure the NTP server:

First we remove the ntpdate

sudo apt-get remove ntpdate

Then we install the NTP server

sudo apt-get install ntp

Next we need to very that it works:

ntpq -p


and verify that the date and time are correct:



And this is it. 🙂

If you would like to play with more settings, here are some things you could change:

Remember to restart the server after any configuration changes so they can take effect:

sudo /etc/init.d/ntp restart


Changing the upstream NTP servers to get updates from:

sudo nano /etc/ntp.conf

We can leave the default server list or we can comment/remove them and replace with whatever servers we prefer. For this example I choose two at random from this list: (I found the default canonical provided server pools to be quite reliable so you can leave this setting alone)


Note. For lower latency google some local NTP server pools 🙂

Note 2. Adding iBurst to a server or more should speed up the initial synchronization with it.

NTP access

sudo nano /etc/ntp.conf

You can let the defaults stand:


If you would like a comprehensive guide to restrictions use this guide:


Part 2.  Preparing system to act as NTP server for Active Directory

For the lab purposes let’s give it two NICs: one facing internet using DHCP eth0 and one facing the internal network with a static configuration eth1 (adapt the settings according to your topology and security)

Edit the network configuration:

sudo nano /etc/network/interfaces

to look like this ( is the internal subnet used by the PDC):



sudo /etc/init.d/networking restart

Final result:


As we can see we gave the NTP server the IP to use in the internal network (same one used by the forest root PDC).

Let’s make a DNS entry for it then:


You can follow the rest:


One thought on “Installing and configuring a Linux NTP server

  1. Pingback: Time synchronization in Active Directory – PDC configuration | Sys Admin

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s