Advance

How to setup NTP server on Ubuntu 20.04

How to setup NTP server on Ubuntu 20.04

Learn how to setup NTP server on Ubuntu 20.04 step by step. NTP Server is known as a synchronization protocol for multiple network clocks across a wide range of clients and servers. The NTP server has features that allow synchronization between two systems with an accuracy of one nanosecond, so that the two systems can communicate easily. System time applies not only to the user but also to the computer itself. In fact, time stamps make it easy to communicate between two or more computers and provide network services properly, as well as optimizing the network card. The NTP protocol was created to prevent unfortunate events that may occur between two or more computers due to different system times. In this article, we try to acquaint you with how to set up NTP Server on Ubuntu 20.04. If you need to buy Ubuntu VPS server, see the packages available in Eldernode.

Tutorial setup NTP server on Ubuntu 20.04

Recommended Article: Tutorial Mariadb installation on Ubuntu

What is the NTP protocol?

NTP, which stands for Network Time Protocol, is one of the oldest protocols used in IP-based networks. The NTP protocol was developed in 1985 by David L. Mills at the University of Delaware. Using this protocol, it is possible to synchronize and use the exact clock to the level of the atomic clock in computer networks. Usually, in a network or any system connected to a global network, by connecting to a time server, it is possible to fine-tune the clock of that system or systems of that network. NTP uses the universal synchronized clock Or Coordinated Universal Time (UTC), which is an atomic time standard, to coordinate computer clocks.

How does the NTP protocol work?

At its most basic, the NTP server consists of synchronization devices such as a client and a NTP server that receives UTC time and delivers it to clients. Clients and servers communicate in a series of requests and responses as follows:

The client sends a NTP request packet to the time server and confirms the execution time. (Source start time)

The server confirms the time of receiving the request package.

The server sends a response packet to the client again.

The customer confirms the destination time when receiving the response package.

This process may only take nanoseconds, but Timestamp allows the client to calculate the latency in the roundabout. It also checks the difference between its internal time and the time provided by the server and, if necessary, resets the clock precisely.

In the rest of this article, join us to teach you how to set up NTP Server on Ubuntu 20.04.

Setup NTP server on Ubuntu 20.04

To install NTP Server on Ubuntu 20.04, you need to follow the steps below. In the first step, you must use the following command to update the system repository:

$ sudo apt update -y

After you have successfully updated the system, now it is time to install the NTP Server using the following command line:

$ sudo apt install ntp

 

NTP server install command on Ubuntu 20.04

 

As you can see in the image above, you will be asked if you want to continue the installation process. Type “Y” and hit Enter to continue the installation.

Next, you need to confirm the installation of NTP Server. To do this and to check the installation status of NTP Server in the system, you need to type and run the following command:

$ sntp --version

 

how to confirm installation ntp server on ubuntu

 

How to configure NTP server on Ubuntu 20.04

Because the program needs to be able to synchronize its time with the public NTP server, you must edit the ntp.conf file after you have successfully installed the NTP server. To do this, type and run the following command:

$ sudo nano /etc/ntp.conf

After executing the above command, a page will appear in which you can see the following information:

pool 0.ubuntu.pool.ntp.org iburst  pool 1.ubuntu.pool.ntp.org iburst  pool 2.ubuntu.pool.ntp.org iburst  pool 3.ubuntu.pool.ntp.org iburst

You must replace the above commands with the NTP Pool Server you want and enter your desired area. Here we have replaced NTP Pool Server North America. You can also view and select the NTP Pool Server list by visiting the NTP site. After replacing the following commands, you must save the file and exit it.

pool 0.north-america.pool.ntp.org iburst  pool 1.north-america.pool.ntp.org iburst  pool 2.north-america.pool.ntp.org iburst  pool 3.north-america.pool.ntp.org iburst

Now it’s time to use the following command and restart the system:

$ sudo systemctl restart ntp

After restarting, use the following command to see the system status and see if NTP Server is active or not:

$ sudo systemctl status ntp

 

How to check NTP Server status on ubuntu

 

Conclusion

Due to the presence of new and diverse types of software and hardware, one of the concerns of network administrators is to synchronize the time of these tools. By doing this, in addition to being safe from possible attacks, information can be stored in more precise detail. In this article, we tried to teach you how to set up NTP Server on Ubuntu 20.04. If you want to do this in Windows, refer to the articles Tutorial NTP Server Configuration via PowerShell and Tutorial Configure NTP Server in Windows Server 2019.

We Are Waiting for your valuable comments and you can be sure that it will be answered in the shortest possible time.

Leave Your Comment

Your email address will not be published.

We are by your side every step of the way

Think about developing your online business; We will protect it compassionately

We are by your side every step of the way

+18054214518

7 days a week, 24 hours a day