In this article we'll shortly see how to do ping against a host or IP but pointing a specific port.
It can be very useful to see if your container/application is alive, for example.
Using Powershell (windows)
We can use the Test-NetConnection
function passing the port as a parameter, for example:
Test-NetConnection <host-or-ip> -port <target-port>
Using cURL
With cURL is untill simplier, just type curl <host-or-ip>:<target-port>
. Example:
curl 127.0.0.1:1433
Top comments (2)
If you have telnet installed,
telnet <host-or-ip> <port>
Notice the netcat too:
nc -zv [target-ip] [port]
Not sure if it's available on Windows