Introduction
This guide covers the installation and configuration of an NTP (Network Time Protocol) server on Fedora 40 using the 5W1H approach. We will explore the What, Who, Where, When, Why, How, Consequences, and Conclusion of setting up an NTP server.
Overview
What
This guide covers the installation and configuration of an NTP (Network Time Protocol) server on Fedora 40 using the 5W1H approach. We will explore the What, Who, Where, When, Why, How, Consequences, and Conclusion of setting up an NTP server.
Who
This guide is intended for system administrators and IT professionals responsible for maintaining server infrastructure and ensuring accurate timekeeping across networked devices.
Where
The setup process can be carried out on any server running Fedora 40 that is intended to act as the central time source for other networked devices.
When
Setting up an NTP server should be done during a planned maintenance window to avoid any potential disruptions to network services.
Why
Implementing an NTP server on your network offers several advantages:
Pros | Cons |
---|---|
Ensures accurate timekeeping across all network devices | Initial setup complexity |
Improves log file accuracy | Requires network access for all devices |
Reduces time drift in distributed systems | Potential single point of failure if not properly configured |
How
Follow these steps to set up an NTP server on Fedora 40:
Step 1 | Update your system: sudo dnf update -y |
Step 2 | Install the NTP package: sudo dnf install -y |
Step 3 | Edit the NTP configuration file: sudo nano /etc/ntp.conf |
Step 4 | Configure your server as an NTP server by ensuring the following lines are included in the file: |
Step 5 | Start and enable the NTP service: | Step 6 |
Consequences
Setting up an NTP server on Fedora 40 can have the following consequences:
Positive |
|
Negative |
|
Conclusion
Setting up an NTP server on Fedora 40 is crucial for maintaining accurate and synchronized time across all devices in a network. While the initial setup can be complex and requires careful configuration, the long-term benefits of accurate timekeeping, improved log file accuracy, and enhanced security make it a worthwhile endeavor for any organization. By following this guide, system administrators can ensure their network infrastructure remains reliable and well-coordinated.
Configure NTP Server
Install Chrony to Configure NTP Server for Time Synchronization.
Step [1]Install and Configure Chrony.
[root@bizantum ~]# dnf -y install chrony
[root@bizantum ~]# vi /etc/chrony.conf
# line 3: change servers to synchronize (replace to your own timezone NTP server)
# need NTP server itself to sync time with other NTP servers
#pool 2.centos.pool.ntp.org iburst
pool ntp.nict.jp iburst
# line 27 : add network range to allow to receive time synchronization requests from NTP Clients
# specify your local network and so on
# if not specified, only localhost is allowed
allow 10.0.0.0/24
[root@bizantum ~]# systemctl enable --now chronyd
Step [2]If Firewalld is running, allow NTP service. NTP uses [123/UDP].
[root@bizantum ~]# firewall-cmd --add-service=ntp
success
[root@bizantum ~]# firewall-cmd --runtime-to-permanent
success
Step [3]Verify it works normally.
[root@bizantum ~]# chronyc sources
MS Name/IP address Stratum Poll Reach LastRx Last sample
===============================================================================
^* ntp-k1.nict.jp 1 6 17 4 -753us[ +741us] +/- 7012us
^- ntp-b2.nict.go.jp 1 6 17 4 -943us[ -943us] +/- 11ms
^+ ntp-a2.nict.go.jp 1 6 17 6 +1108us[+2602us] +/- 9162us
^- ntp-b3.nict.go.jp 1 6 17 5 -1067us[-1067us] +/- 10ms
Configure NTP Client
Configure NTP Client.
Step [1]Client configuration is mostly the same with Server's one, however NTP Clients does not need to receive time synchronization requests from other hosts, so it does not need to specify the ACL line [allow ***].
[root@node01 ~]# dnf -y install chrony
[root@node01 ~]# vi /etc/chrony.conf
# line 3 : change to your own NTP server or others in your timezone
#pool 2.centos.pool.ntp.org iburst
pool dlp.bizantum.lab iburst
[root@node01 ~]# systemctl enable --now chronyd
# verify status
[root@node01 ~]# chronyc sources
MS Name/IP address Stratum Poll Reach LastRx Last sample
===============================================================================
^* dlp.bizantum.lab 2 6 7 0 +6273ns[-1740us] +/- 7852us
Step [2]To Install NTPStat, it's possible to display time synchronization status.
[root@node01 ~]# dnf -y install ntpstat
[root@node01 ~]# ntpstat
synchronised to NTP server (10.0.0.30) at stratum 3
time correct to within 9 ms
polling server every 64 s
- Get link
- X
- Other Apps
Comments
Post a Comment
Thank you for your comment! We appreciate your feedback, feel free to check out more of our articles.
Best regards, Bizantum Blog Team.