How to configure NTP/SNTP in ubuntu?

NTP/SNTP is a protocol which is used for syncing the time between multiple nodes in the network.
Here are the steps to Configure NTP client in Ubuntu:
  1. update /etc/ntp.conf with your server. server
  2. ntpdate
  3. /etc/init.d/ntpd restart
  4. Update the firewalls rule to accept NTP traffic:
iptables -A OUTPUT -p udp --dport 123 -j ACCEPT
iptables -A INPUT -p udp --sport 123 -j ACCEPT
  1. Check if the server is picking up right NTP server: sudo ntpq -np
   remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
*81.76.22.20   8.78.8.80      2 u  116  128  377    0.540   -9.006   5.55

Star indicates the server is picking up right server.

Comments