How To Ping Specified Port Number?


Ping is a very popular term used by the system or network administrators. Ping means checking the given remote system whether it is up. A ping is a simple tool which uses ICMP protocol to check remote host. Some times ping port can be used with similar intentions. In this tutorial, we will look at how to ping remote system given ports.

Ping Remote System

We will start with regular ping. This will show us that the remote system is up. In some situations, the remote systems may be up but do not respond ping.

$ ping 192.168.47.133
Ping Remote System
Ping Remote System

Ping Remote Port with Nmap

nmap is a very useful tool used by system administrators, network administrators, and pen testers. nmapprovides a lot of network-related scan features. For more information please follow tutorial below.

Nmap Tutorial

In this example we will specify the port we want to ping with -p option. Keep in mind that this will be a TCP port. We will ping google.com port 443 or we can use a port name like  https .

$ nmap -p 443 google.com
Ping Remote Port with Nmap
Ping Remote Port with Nmap

As we can see the port is the open and remote host is up too.

Ping Remote Port with Netcat

netcat is another useful tool which provides remote connection, listening ports and port scan. Detailed information about netcat can be found in the following tutorial.

Netcat (nc) Command Tutorial With Examples

We can use netcat in order to scan remote systems ports. In this example, we will ping google.com port 443.

$ nc google.com 443
Ping Remote Port with Netcat
Ping Remote Port with Netcat

After connecting remote port there will be meaningless responses which means the remote port is up.

LEARN MORE  Popular Free DNS Services Around The World

Ping Remote Port with Telnet

telnet is another useful tool used to connect remote telnet servers. But we can use this tool in order to ping remote TCP ports. We will ping google.com port 443 with the following command.

$ telnet google.com 443
Ping Remote Port with Telnet
Ping Remote Port with Telnet

The connection is established and then after a timeout, it is closed which means ping is successful.

Ping Remote Port with PowerShell Test-NetConnection

PowerShell provides cmdlets for different purposes. Test-NetConnection is a cmdlet that is used to test the remote specific port connection by providing the remote host and port number with the option -port. Below we will test google.com port 443 connection.

PS> Test-NetConnection google.com -port 443
PowerShell Test-NetConnection

Ping Remote Port with the curl Command

curl is a command used to download and upload over the network via command line for Linux systems. It is also provided for Windows systems as a 3rd party tool. We can use the curl to ping remote specific port. We will just provide the host and port by delimiting them with :. In the following example, we will ping google.com host port 443.

$ curl google.com:443

$ curl poftut.com:443

$ curl donotexist.com:443
Ping Specific Port with curl

We can see that google.com responds to connect to port 443 with an empty reply. This means the remote port is open.

Poftut.com is responded with a bad request error. This means the remote port is open.

donotexist.com is failed to connect because the connection is refused which means there is no listening port on the donotexist.com.

1 thought on “How To Ping Specified Port Number?”

Leave a Reply to Khan Cancel reply