Content

Admin Tools

Articles

   

Monitoring TCP Ports - 05-Oct-2024

Monitoring TCP Ports

Every server, client and router provides TCP ports that enable other network devices to establish a communication connection. These are logical ports, which are distinguished by the port number. The number is in the range from 0 to 65535 - the "well-known" ports (0 - 1023), the "registered" ports (1024 - 49151) and the "dynamic and private" ports (49152 - 65535).

Why should I monitor TCP Ports?

By regularly checking a specific TCP port, it is possible to determine whether a server is still functioning correctly. A TCP port check is a more detailed test than a ping because it checks whether certain services are available on the server. If the ping works, it only means that the server still has a network connection. If the TCP port check works, however, the server is still providing services on this port. The word “server” is used here in the sense of “network device that provides TCP ports”. It can also be a client or another network device.

Monitoring TCP Ports with system monitoring software

There are many different tools on the market for monitoring TCP ports, for example WhatsUp Gold, OpManager or PRTG. These tools are suitable for continuous monitoring over months. The usual monitoring intervals are 2 - 5 minutes. Various alarm procedures are available, for example sending an e-mail in the event of a failure. The tools are server-based and implementation usually takes place within a project. These tools are less suitable for second-by-second monitoring.

Monitoring TCP Ports with adhoc monitoring software

Ad hoc monitoring software is able to show to the second whether servers are responding on TCP ports or not. In the following, we present the PingTool software. PingTool is free software for Windows 11 that can monitor remote servers agentlessly - monitoring can be performed with ping (ICMP) and by requesting TCP ports.


Monitoring TCP ports. Router-Berlin is not responding on TCP port 22 (SSH)

The monitoring interval can be configured from 1 second to 2 minutes. E-mails can be sent in the event of failure and availability. All status changes are logged automatically. PingTool is a Ping GUI for administrators and network admins who want ad hoc monitoring. It is very suitable for detecting status changes immediately. Although it is possible, PingTool is less suitable for monitoring systems over months and years. PingTool is a portable tool, which opens up many application scenarios.


Monitoring TCP Ports via command line

Another option is to monitor TCP ports via the command line. The TCP PortCheck tool for Windows 11 can check the TCP ports of a remote server and perform self-defined actions, such as sending an email, if they cannot be reached.

PortCheck is able to check multiple hosts on multiple TCP ports. The results can be logged with a time stamp in a log file. It has many additional features like sending an acoustic signal in the event of a failure or executing a specific batch file.

How can I find open TCP ports?

To find open TCP ports, open a command prompt on the server and have a look at the netstat -a command. The command shows you all existing connections and all connections on which the server is listening. You can also run netstat -a on the client to see which servers the client has established a connection with. You can find more details about open TCP ports in the article Find open TCP ports in Windows.

 

Additional articles: 

 

Content: How to monitor TCP ports, Free ping monitoring tool