-2

I am using the centos7 AMI, there i need to sync the time from Amazon (x.amazon.pool.ntp.org) ntp servers, how i can configure, do i need to open the port 123 for this?

mbm
  • 77
  • 1
  • 1
  • 4
  • Why don't you try some things and get back to us with a specific question or problem you are having? – Charlie Fish Sep 16 '16 at 04:35
  • I configure the ntp client and but i am getting below message while passing ntpdate command 16 Sep 04:51:55 ntpdate[29134]: no servers can be used, exiting – mbm Sep 16 '16 at 04:51

1 Answers1

1

PS: I wanted to comment on question,but I can't as I don't have enough reputation.

If you are on AWS, and inside VPC or say your instance has security groups (SG) and network ACL applied which is preventing from ntp to sync than you have to open port 123 on ACL and SG to connect to amazon/ubuntu servers for sync. (I faced similar problem - opening the port resolved it).

if not already tried you can install ntp and try to sync it

sudo yum install ntp
chkconfig ntpd on
ntpdate pool.ntp.org
service ntpd start

reference from here link for ntp commands as i am more familiar with ubuntu(debian) based commands

Community
  • 1
  • 1
  • also amazon ami comes with amazon ntp pools in config but it does not make difference as amazon ntp servers are also in public domains and not in amazon internal infrastructure, so you may have to open 123 port to internet facing. –  Sep 16 '16 at 05:02
  • try updating /etc/ntp.conf with new pools of server- maybe ubuntu ones like "server 0.ubuntu.pool.ntp.org" or ntp.server.com –  Sep 16 '16 at 05:04