Signup/Sign In
Ask Question
Not satisfied by the Answer? Still looking for a better solution?

Ping a Specific Port

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.
by

2 Answers

akshay1995
You can't ping ports, as Ping is using ICMP which doesn't have the concept of ports. Ports belong to the transport layer protocols like TCP and UDP. 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.
sandhya6gczb
Open a telnet session to the specific port, for example:

# telnet google.com 80
Trying 74.125.226.48...
Connected to google.com.
Escape character is '^]'.


To close your session, hit Ctrl+].

Login / Signup to Answer the Question.