Skip to content
GitHubStars: 01 views

ntp_server

NTP Server

This project implements an NTP (Network Time Protocol) server in Python.

Requirements

  • Python 3.12

Installation

  1. Clone the repository:
git clone [email protected]:peluza/ntp_server.git
  1. Install the dependencies:
pip install -r requirements.txt

Execution

  1. Run the NTP server:
python main.py
  1. Configure your NTP client to synchronize with the server.

How it works

The NTP server works as follows:

  1. The server listens on UDP port 123.
  2. When it receives a time request, the server responds with the current time.
  3. The NTP client uses the server's information to synchronize its clock.

Usage example

To synchronize your system clock with the NTP server, you can use the ntpdate command:

ntpdate 127.0.0.1

Replace 127.0.0.1 with the IP address of the NTP server.

Note

The NTP server runs in test mode and is not designed for production use.