Fedora Tips 53

From FedoraNEWS.ORG

How to sync your hardware clock behind a firewall

By default rdate, time synchronization tool, uses port 37 tcp, ntp uses port 123 UDP, to synchronize your hardware clock. Since most firewalls don't have this port opened to outside (specially if your box is in some company's DMZ) not even rdate tool can help you keep the correct time on your server. That's where htpdate tool comes in play. HTP is not really a protocol, but uses a feature from HTTP, aka web traffic. With this feature you are able to sync your hardware clock thru HTTP protocol. How? Read Here (http://www.clevervest.com/htp/htp.html).

Download and install htpdate tool from HTP Homepage (http://www.clevervest.com/htp/development.html).

Next step is to sync your hardware clock with the correct time using the command

htpdate –s www.google.com www.yahoo.com www.some_web_site_near_you.com

There is really no need to put more than one server in the list. You can use only one if you know that's showing the correct time and you're all set. Also make sure to check the man page for some other useful options like daemon mode etc. You can also put this command line into crontab for example, to keep the correct time, all the time.

Submitted by Anze Vidmar (mailto:anzevi@gmail.com)

Personal tools