Differences
This shows you the differences between two versions of the page.
| coreartikel:timesyncntp [2005/10/19 01:54] – created bang | coreartikel:timesyncntp [2025/10/25 17:09] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== Sinkronisasi waktu dengan NTP ====== | ||
| + | NTP (Network Time Protocol) merupakan protokol yang digunakan untuk melakukan time-synchronisation antara host dengan host yang lainnya, sebagai contoh dalam sistem jaringan Kerberos, kecocokan jam antara host satu dengan host yang lainnya mutlak diperlukan, atau antara dedicated loghost dengan firewall, router, multipurpose server dan nids. | ||
| + | Catatan singkat ini akan memberikan panduan konfigurasi sistem NTP yang berada di jaringan lokal untuk digunakan sebagai NTP server bagi server lainnya, dan sekaligus bagaimana mengkonfigurasikan sistem yang bertindak sebagai NTP client. | ||
| + | Yang diperlukan untuk pertama kalinya adalah: | ||
| + | * Install di setiap sistem yang akan memanfaatkan protokol ini (OS independent, | ||
| + | * Menentukan kemana harus meletakkan NTP server (bisa dedicated atau existing system, mengingat proses NTP ini tidaklah membebani server secara signifikan) | ||
| + | * Menentukan server diluar jaringan yang bisa dijadikan acuan untuk sinkronisasi (eg. Stratum 2 server), anda bisa melihat daftar server NTP diluar negeri [http:// | ||
| + | |||
| + | **Konfigurasi di sisi NTP server lokal:** | ||
| + | edit file konfigurasi ntp.conf, modifikasi isinya kira-kira menjadi seperti ini (silahkan baca manual dari ntp apabila ingin mengetahui referensinya secara lengkap): | ||
| + | |||
| + | < | ||
| + | # OK with local | ||
| + | # accept local NTP queries | ||
| + | restrict 127.0.0.1 | ||
| + | |||
| + | # REMOTE SERVER we sync with | ||
| + | server tock.usno.navy.mil | ||
| + | server clock.isc.org | ||
| + | server tick.usno.navy.mil | ||
| + | restrict tock.usno.navy.mil mask 255.255.255.255 nomodify notrap noquery | ||
| + | restrict clock.isc.org mask 255.255.255.255 nomodify notrap noquery | ||
| + | restrict tick.usno.navy.mil mask 255.255.255.255 nomodify notrap noquery | ||
| + | |||
| + | # CLIENT NETWORK allowed to sync with us | ||
| + | restrict 202.155.20.0 mask 255.255.255.0 nomodify notrust notrap | ||
| + | restrict 202.155.21.0 mask 255.255.255.0 nomodify notrust notrap | ||
| + | |||
| + | # Drift file. Put this in a directory which the daemon can write to. | ||
| + | # No symbolic links allowed, either, since the daemon updates the file | ||
| + | # by creating a temporary in the same directory and then rename()' | ||
| + | # it to the file. | ||
| + | # | ||
| + | driftfile / | ||
| + | |||
| + | # debugging | ||
| + | #logfile / | ||
| + | </ | ||
| + | |||
| + | untuk menguji apakah konektivitas dengan server diluar dapat dilakukan, gunakan perintah ntpdate: | ||
| + | < | ||
| + | ntpdate clock.isc.org | ||
| + | </ | ||
| + | |||
| + | untuk menguji apakah konfigurasi ntp.conf sudah ok, gunakan ntpq, namun sebelumnya hidupkan proses ntpd nya terlebih dahulu: | ||
| + | < | ||
| + | ntpq -p | ||
| + | </ | ||
| + | |||
| + | Konfigurasi untuk NTP client, semisal hostaddress NTP server kita adalah time.example.org, | ||
| + | < | ||
| + | # Permit all access over the loopback interface. | ||
| + | # be tightened as well, but to do so would effect some of | ||
| + | # the administrative functions. | ||
| + | restrict 127.0.0.1 | ||
| + | |||
| + | |||
| + | # --- OUR TIMESERVERS ----- | ||
| + | # or remove the default restrict line | ||
| + | # Permit time synchronization with our time source, but do not | ||
| + | # permit the source to query or modify the service on this system. | ||
| + | |||
| + | # restrict mytrustedtimeserverip mask 255.255.255.255 nomodify notrap noquery | ||
| + | # server mytrustedtimeserverip | ||
| + | server time.example.org | ||
| + | |||
| + | # | ||
| + | # Drift file. Put this in a directory which the daemon can write to. | ||
| + | # No symbolic links allowed, either, since the daemon updates the file | ||
| + | # by creating a temporary in the same directory and then rename()' | ||
| + | # it to the file. | ||
| + | # | ||
| + | driftfile / | ||
| + | |||
| + | # | ||
| + | # Logs | ||
| + | #logfile / | ||
| + | </ | ||
| + | |||
| + | note: | ||
| + | * konfigurasi ntp diatas tidak menggunakan autentifikasi, | ||
| + | * jangan lupa untuk membuka akses udp ke port 123 pada NTP server | ||
| + | |||
| + | ===== Referensi: ===== | ||
| + | |||
| + | * [[http:// | ||
| + | * [[http:// | ||