While the ping command confirms connectivity, it does not necessarily mean that all TCP ports on the remote host can be reached. It is possible for a network firewall to allow or block access to certain ports on a host.
To check if specific TCP ports are running on the remote host, you can use the telnet command to confirm if a port is online.
# telnet destination-ip destination-port
When trying to establish a telnet connection to TCP port 80, you see an output similar to:
# telnet 192.168.1.11 80Trying 192.168.1.11…Connected to 192.168.1.11.
Escape character is ‘^]’.
In this sample output, you can see that you are connected to port 80 (http) on the server with IP address 192.168.1.11.
If you choose a port number for a service that is not running on the host, you see an output similar to:
# telnet 192.168.48.1.11Trying 192.168.1.11…
telnet: Unable to connect to remote host: Connection timed out
In this case, you can see that there is no response when you attempt to connect to port 81 on the server 192.168.48.133.
Note: Telnet is an application that operates using the TCP protocol. UDP connectivity can not be tested using Telnet.