Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I installed NTP server on Ubuntu Server 10.04 using:

sudo apt-get install ntp

The NTP daemon seems working and listening on the 123 port.

However, I was not able to get the time from another machine:

sudo ntpdate -u my_ntp_server
23 Nov 18:48:41 ntpdate[2990]: no server suitable for synchronization found

Is there any necessary configurations to do?

share|improve this question
up vote 5 down vote accepted

Here's a good how-to from ubuntu forums:

share|improve this answer
Thanks for the link. Actually, I did not change my configuration! It just worked after some time. – Khaled Nov 24 '10 at 8:03
on your ntp server you can run ntpdate -s a_stratum_1_server_address to force it to sync immediately. then on your other (client) machine, running 'ntpdate -q your_local_ntp_server` should respond with something similar toserver your_local_ntp_server_ip, stratum 2, offset -0.012221, delay 0.02618 – Keith Reynolds Aug 7 '15 at 17:36

There are many links about this and it seems to me that they complicate the procedure. In my case I have one machine that acts as a proxy server and a firewall, and all my others connect to the internet through it. I did not want to open ports on the firewall. Therefore the proxy server must be the time (ntp) server and the other machines (clients) get the time from it.

You must install ntp on all the machines, and you should install ntpq on all of them as well.

First, see if ntp is working. By default, ntpd (the ntp daemon) will be running as soon as it is installed, and the defaults should work. However, ntp does not work instantly, so wait a while. Then, the command:

ntpq -c lpeer

should give you output that looks something like this:

     remote           refid      st t when poll reach   delay   offset  jitter
+golem.canonical    2 u  170 1024  377  140.458   -0.655   3.234
*gatekeeper.tss.     2 u  608 1024  377   84.650    2.168   0.471


ntpq --numeric --peers

     remote           refid      st t when poll reach   delay   offset  jitter
+    2 u  652 1024  377  140.151   -0.242   2.821
*     2 u   64 1024  377   85.074    2.409   0.963

If so, you're connected and your time server is getting the time. If not, use

ps -e | grep "ntp" 

to be sure that ntp in running, and try again. Also try restarting ntp:

sudo /etc/init.d/ntp restart

it may take some "time" (sorry!) before the connection is established. The daemon does not poll the servers very often. The "when" column in the output above shows the time in seconds since the server was polled.

Now, you have to make the time server send the time to your other machines.

Edit the file /etc/ntp.conf on the server. You have to add a line for your network. In my case, I have a network. In the ntp.conf file, I added the line:


You must add a broadcast line for each segment of your network. If your network is simple like mine, one line like the above is all you need. Now, restart ntp using the command above, and check again using ntpq, and you should see:

     remote           refid      st t when poll reach   delay   offset  jitter
+golem.canonical    2 u   70 1024  377  140.151   -0.242   2.821
*gatekeeper.tss.     2 u  506 1024  377   84.650    2.168   0.241  .BCST.          16 u    -   64    0    0.000    0.000   0.002

Voila, it's broadcasting.

Now, you must make every client machine get the time from your broadcasting server. On each one, edit the file:


and you will see some lines specifying servers.

add a line


or whatever the address of your server is. Then restart ntp on the client machine using the above command. Alternatively, you can get the process ID and just kill it, and run it again. Whatever.

Then, after sufficient time, check with ntpq:

ntpq --numeric --peers
     remote           refid      st t when poll reach   delay   offset  jitter
*        3 u  123 1024  377    0.430    1.022   1.831

and you can see that the client is using the time server.

This takes some time.

share|improve this answer
You can run ntpdate -s a_stratum_1_server_address on your ntp server to force it to poll and synchronize immediately. – Keith Reynolds Aug 7 '15 at 17:39

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.