Testing whether TCP connection can be established

Sometimes as TCP connection to a server can not be established. To check whether there is really a problem and someone is blocking the TCP connection from one computer to another one you can use the following two procedures:

Using Powershell

  • Open a powershell window

  • Type the following command:

Test-NetConnection -ComputerName IP_ADDRESS -Port PORT

Example: To test that a TCP connection from FAB Teletext Editor to FAB Network Controller can be established type this (replace the IP address and port with your correct IP address and port):

Test-NetConnection -ComputerName 192.168.211.126 -Port 8367

ComputerName     : fabtest                                                                                              RemoteAddress    : 192.168.211.126                                                                                      RemotePort       : 8367                                                                                                 InterfaceAlias   : FAB
SourceAddress    : 192.168.206.22
TcpTestSucceeded : True

If the connection was not blocked by a firewall and was established correctly, then the line TcpTestSucceeded will contain True, otherwise False.

Using curl

  • Open a command prompt window

  • Type the following command:

curl -v telnet://IP_ADDRESS:PORT

Example: To test that a TCP connection from FAB Teletext Editor to FAB Network Controller can be established type this (replace the IP address and port with your correct IP address and port):

curl -v telnet://192.168.211.126:8367

* Host 192.168.211.126:8367 was resolved.
* IPv6: (none)
* IPv4: 192.168.211.126
*   Trying 192.168.211.126:8367...
* Connected to fabtest (192.168.211.126) port 8367

“Connected” indicates that the connection was established correctly.

Press Ctrl+C to return back to command line.

Actions to be taken

In case that the connection can not be established:

Checks on the server computer which is accepting TCP connections:

  • Check the configuration on the server computer to see which TCP port is configured to accept TCP connections.
  • Check that the software accepting TCP connections on the server is actually running (in task manager).
  • On the server use the command “netstat -a -b” as admin to see if the server is actually listing on the correct TCP port.
  • Check that the firewall on the server computer is not blocking the incoming TCP connection.

Checks for network infrastructure:

  • Check that that any firewall inbetween the two computers is not blocking the connection.

In case that the connection can be established there is most probably a configuration problem:

  • Check the configuration on the client computer to see that the correct IP_ADDRESS and PORT was entered.
  • In rare cases it is possible that the Windows firewall or any other firewall installed on the client computer blocks the outgoing connection. To check this temporarily disable all firewalls on the client computer.

This page was last updated on 2025-02-08