Just a quick sanity check here.

Can you ping a specific port of a machine, and if so, can you provide an example?

I'm looking for something like ping ip address portNum.


40 accepted

You can't ping ports, as Ping is using ICMP which doesn't have the concept of ports itself. Ports belong to the IP family of protocols (with TCP and UDP being its famous transport layer protocols). However, you could use nmap to see whether ports are open or not

nmap -p 80 example.com

Edit: As flokra mentioned, nmap is more than just a ping-for-ports-thingy. It's the security auditers and hackers best friend and comes with tons of cool options. Check the doc for all possible flags.


Open a telnet session to the specific port .

telnet ip address portNum


You can use PaPing:


C:\>paping.exe www.google.com -p 80 -c 4
paping v1.5.1 - Copyright (c) 2010 Mike Lovell

Connecting to www.l.google.com [] on TCP 80:

Connected to time=24.00ms protocol=TCP port=80
Connected to time=25.00ms protocol=TCP port=80
Connected to time=24.00ms protocol=TCP port=80
Connected to time=24.00ms protocol=TCP port=80

Connection statistics:
        Attempted = 4, Connected = 4, Failed = 0 (0.00%)
Approximate connection times:
        Minimum = 24.00ms, Maximum = 25.00ms, Average = 24.25ms


There's no guarantee that the service running on the port understands ping. It also opens up the question of what "flavor" of port you want to ping, TCP or UDP? Since the ping "protocol" uses neither (ping is implemented using ICMP), it doesn't make a lot of sense.


No, you can't, because ping uses the ICMP protocol, which doesn't even have a conecpt of ports.


Ping is very specific but if you want to check whether a port is open or not, and are running a Windows box then PortQry is your friend.

I've only used it for testing Domain Controllers for connectivity issues, but it worked a treat for that, so should work for you.


i'm feeling lucky on google for ?ping a specific port?: http://philwilks.blogspot.com/2008/01/ping-specific-port.html, so NO, you cannot ping a specific port

you can use nmap though: nmap -p <port> <host>


I'm quite sure that Nagios check_tcp probe does what you want. They can be found here and although designed to be used in a Nagios context, they're all standalone programs.

$ ./check_tcp -H host -p 22
TCP OK - 0.010 second response time on port 22|time=0.009946s;0.000000;0.000000;0.000000;10.000000

If you are running a *nix operating system try installing and using "zenmap", it is a GUI for nmap and has several useful scan profiles which are a great help to the new user.


Or instead of paping you could use cryping which has been around much longer and supports pinging of some services as well as ports.


try this simple app http://porttest.blogspot.com/


Try port knocking software. Personally I use KnockKnock ( http://sourceforge.net/projects/knockknock/ ). It remembers the combination of ports and the IP.