What is Port 37?
by Colin Cohen | Published on November 29, 2024
Port 37 is dedicated to the Time Protocol (TP), which allows clients in a TCP/IP network to update their time from that of a server on the network.
To understand the purpose of port 37, you need to understand TP.
In large networks, it’s important for devices to synchronize their time so that certain processes can properly execute. TP enables time synchronization by having clients update their time from the time of a designated time server.
TP clients and servers communicate over port 37.
Due to technical limitations and vulnerabilities, the use of Network Time Protocol (NTP) over port 123 has largely superseded the use of TP over port 37.
What is Port 37?
Port 37 is for TP. It allows clients on a TCP/IP network to synchronize their times, but it has both technical and security issues.
Historical Background
Time synchronization of devices is important in organizations, as devices often need to be operating at the same time. For example, a cron job could run on a device at the same time each day. But if it runs at a different time than other devices in the network, this could cause serious issues.
TP over port 37 was created to solve this problem. However, because the protocol does not account for network latency and has serious security issues, NTP over port 123 has largely replaced it.
Technical Specifications
When using TP, a client sends a time request to a server over port 37. It can send this request using Transport Control Protocol (TCP) or User Datagram Protocol (UDP). UDP is faster, but TCP is more reliable.
The server will respond by sending the client a 32-bit integer representing the number of seconds that have elapsed since midnight on January 1, 1900 (in UTC time). The client will then use this number to update its time.
Security Considerations
TP is not a secure protocol. Developed before network security was an issue, TP over port 37 lacks support for authentication and encryption and is susceptible to a slew of exploits, such as denial-of-service (DoS) attacks, man-in-the-middle attacks, and spoofing.
To mitigate these issues, you should restrict access to port 37 on your devices to trusted networks. However, you should strongly consider switching to NTP over port 123 instead.
How is Port 37 Used?
Today, TP over port 37 is rare, as NTP over port 123 has largely superseded it. However, it still has uses when supporting legacy systems or in situations where simplicity is of paramount importance.
Current Utilizations
TP over port 37 is rarely used today. The use of NTP over 123 has largely superseded it. However, it still has uses when supporting legacy systems. Some organizations may also use the protocol within embedded industrial control systems, where its simplicity outweighs its drawbacks.
Comparisons with Other Ports
NTP over port 123 is far superior to using TP over port 37, to the extent that there is little reason to use the latter today. NTP is more accurate and secure than TP. The only benefits of TP in comparison to NTP are that it supports legacy systems and is simpler than NTP.
How to Configure Port 37
Configuring TP servers for use over port 37 is different for Linux and Windows devices. But both require you to set up a service to listen on the port.
Setup and Implementation
To set up TP over port 37 on a Linux server, you need to create, in the /etc/xinetd.d directory, a file called time with a configuration similar to the example in the Network Configuration Examples section below. Then you need to restart the xinetd service so that it will listen on the port.
To set TP over port 37 on a Windows server, you need to start the time service to listen on the port, either in the Services Manager or in a command prompt by running: net start time.
The most common troubleshooting issue you will likely encounter when implementing TP over port 37 is connectivity. If this happens, check if the port is open in your devices’ firewalls.
Network Configuration Examples
The following is an example time configuration file for setting up TP over port 37 in Linux:
service time {
disable = no
type = INTERNAL
id = time-stream
socket_type = stream
protocol = tcp
user = root
wait = no
}
If you want to use UDP instead of TCP, change the socket_type to dgram and the protocol to UDP.
FAQs
The following FAQs answer questions typically asked relating to port 37. They provide a basic understanding of the port and its uses.
What is Port 37 Primarily Used for?
Port 37 is used for TP. It allows clients to synchronize their time on a network. However, NTP over port 123 has largely superseded it.
How Does Port 37 Differ from Port 123?
Port 37 is for TP, while port 123 is for NTP. While both protocols perform time synchronization, NTP does this far better and is far more secure.
Are There any Security Risks Unique to Port 37?
TP over port 37 carries many security risks, as it does not support authentication or encryption. Vulnerabilities include DoS attacks, man-in-the-middle attacks, and spoofing.
Can Port 37 Be Used in Modern Cloud Services?
Generally, port 37 is not used in modern cloud services, as the TP protocol associated with it is outdated and unsecured. However, there might be rare instances in which you would use it in the cloud, such as when supporting legacy systems or when you need a very simple time synchronization protocol.
What are the Alternatives to Port 37 for Time Synchronization?
The main alternative to using TP over port 37 for time synchronization is NTP over port 123. It is a more modern protocol that is more effective and more secure than using TP.
Conclusion
You use port 37 for implementing TP. It lets clients on a TCP/IP network update their time from a server. But as the protocol is outdated, limited, and unsecure, you should strongly consider using NTP over port 123 instead.