{"id":9064,"date":"2015-02-04T10:46:50","date_gmt":"2015-02-04T15:46:50","guid":{"rendered":"http:\/\/jianmingli.com\/wp\/?p=9064"},"modified":"2015-02-04T10:46:50","modified_gmt":"2015-02-04T15:46:50","slug":"sync-time-with-pool-ntp-org","status":"publish","type":"post","link":"https:\/\/jianmingli.com\/wp\/?p=9064","title":{"rendered":"Sync Time with pool.ntp.org"},"content":{"rendered":"<div class='toc wptoc'>\n<h2>Contents<\/h2>\n<ol class='toc-odd level-1'>\n\t<li>\n\t\t<a href=\"#RHEL\">RHEL<\/a>\n\t<\/li>\n\t<li>\n\t\t<a href=\"#Windows\">Windows<\/a>\n\t<\/li>\n\t<li>\n\t\t<a href=\"#ESXi_5.1\">ESXi 5.1<\/a>\n\t<\/li>\n\t<li>\n\t\t<a href=\"#References\">References<\/a>\n\t<\/li>\n<\/ol>\n<\/ol>\n<\/div>\n<div class='wptoc-end'>&nbsp;<\/div>\n<span id=\"RHEL\"><h2>RHEL<\/h2><\/span>\n<p>* Open NTP port 123:<br \/>\nvi \/etc\/sysconfig\/iptables<\/p>\n<pre lang=\"bash\">\r\n:RH-Firewall-1-INPUT - [0:0]\r\n# Open NTP port 123\r\n-I INPUT -p udp -m udp -m multiport --dports 123 -m state --state NEW -j ACCEPT\r\n-A INPUT -j RH-Firewall-1-INPUT\r\n<\/pre>\n<p>* Restart iptables<\/p>\n<pre lang=\"bash\">\r\nservice iptables restart\r\n<\/pre>\n<p>* Configure NTP server<br \/>\nvi \/etc\/ntp.conf<\/p>\n<pre lang=\"bash\">\r\nserver pool.ntp.org\r\n<\/pre>\n<p>* Restart ntpd<\/p>\n<pre lang=\"bash\">\r\nservice ntpd restart\r\n<\/pre>\n<p>* Check NTP status with <em>ntpstat<\/em><\/p>\n<pre lang=\"bash\">\r\nntpstat\r\nsynchronised to NTP server (198.58.100.237) at stratum 3\r\n   time correct to within 97 ms\r\n   polling server every 64 s\r\n<\/pre>\n<p>* Check NTP host with <em>ntpq -p<\/em><\/p>\n<pre lang=\"bash\">\r\nntpq -p\r\n     remote           refid      st t when poll reach   delay   offset  jitter\r\n==============================================================================\r\n*tux.brhelwig.co 216.218.254.202  2 u   11  128  377   46.408    0.703   0.647\r\n LOCAL(0)        .LOCL.          10 l   13   64  377    0.000    0.000   0.001\r\n<\/pre>\n<span id=\"Windows\"><h2>Windows<\/h2><\/span>\n<p>* See <a href=\"http:\/\/technet.microsoft.com\/en-us\/library\/cc773263%28v=ws.10%29.aspx\">Windows Time Service Tools and Settings<\/a><br \/>\n* <a href=\"http:\/\/www.tomshardware.com\/forum\/226975-46-time-service-windows-2003\">NTP time service in Windows 2003<\/a><\/p>\n<span id=\"ESXi_5.1\"><h2>ESXi 5.1<\/h2><\/span>\n<p>* Login vSphere<br \/>\n* Click <em>host > Configuration > Time Configuration > Properties<\/em><br \/>\n* Select <em>NTP Client Enabled<\/em><\/p>\n<span id=\"\"><h6><a href=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/10\/ntp_esxi51_config_1.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/10\/ntp_esxi51_config_1-300x141.jpg\" alt=\"\" title=\"ntp_esxi51_config_1\" width=\"300\" height=\"141\" class=\"aligncenter size-medium wp-image-9066\" srcset=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/10\/ntp_esxi51_config_1-300x141.jpg 300w, https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/10\/ntp_esxi51_config_1.jpg 1012w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/h6><\/span>\n<p>* Click <em>Options > General<\/em><br \/>\n&#8211; Select <em>Start automatically&#8230;<\/em><\/p>\n<span id=\"_1\"><h6><a href=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/10\/ntp_esxi51_config_2_general.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/10\/ntp_esxi51_config_2_general-300x153.jpg\" alt=\"\" title=\"ntp_esxi51_config_2_general\" width=\"300\" height=\"153\" class=\"aligncenter size-medium wp-image-9067\" srcset=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/10\/ntp_esxi51_config_2_general-300x153.jpg 300w, https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/10\/ntp_esxi51_config_2_general.jpg 631w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/h6><\/span>\n<p>* Click <em>NTP Settings<\/em><br \/>\n* Click <em>Add&#8230;<\/em> to add <em>pool.ntp.org<\/em><br \/>\n* Check <em>Restart NTP service to apply changes<\/em> and click <em>OK<\/em><\/p>\n<span id=\"_2\"><h6><a href=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/10\/ntp_esxi51_config_2_svr.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/10\/ntp_esxi51_config_2_svr-300x152.jpg\" alt=\"\" title=\"ntp_esxi51_config_2_svr\" width=\"300\" height=\"152\" class=\"aligncenter size-medium wp-image-9068\" srcset=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/10\/ntp_esxi51_config_2_svr-300x152.jpg 300w, https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/10\/ntp_esxi51_config_2_svr.jpg 631w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/h6><\/span>\n<span id=\"References\"><h2>References<\/h2><\/span>\n","protected":false},"excerpt":{"rendered":"<p>RHEL * Open NTP port 123: vi \/etc\/sysconfig\/iptables :RH-Firewall-1-INPUT &#8211; [0:0] # Open NTP port 123 -I INPUT -p udp -m udp -m multiport &#8211;dports 123 -m state &#8211;state NEW -j ACCEPT -A INPUT -j RH-Firewall-1-INPUT * Restart iptables service &hellip; <a href=\"https:\/\/jianmingli.com\/wp\/?p=9064\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[81],"tags":[161],"class_list":["post-9064","post","type-post","status-publish","format-standard","hentry","category-util","tag-ntp"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p8cRUO-2mc","_links":{"self":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/9064","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=9064"}],"version-history":[{"count":6,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/9064\/revisions"}],"predecessor-version":[{"id":10565,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/9064\/revisions\/10565"}],"wp:attachment":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=9064"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=9064"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=9064"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}