job.answiz.com
  • 3
Votes
name
name Punditsdkoslkdosdkoskdo

Is it possibles to ping an Address:port?

I am not into networking, and I have the following question related to the Linux ping command.

Can I only ping an address? For example:

miner@raspberrypi ~ $ ping onofri.org
PING onofri.org (67.222.36.105) 56(84) bytes of data.
64 bytes from onofri.org (67.222.36.105): icmp_req=1 ttl=47 time=202 ms
64 bytes from onofri.org (67.222.36.105): icmp_req=2 ttl=47 time=206 ms
64 bytes from onofri.org (67.222.36.105): icmp_req=3 ttl=47 time=215 ms

Or can I also ping an address:port, for example: onofri.org:80?

If I try this one it doesn't work:

miner@raspberrypi ~ $ ping onofri.org:80
ping: unknown host onofri.org:80

Is it possible ping something like address:port? If it is possible, why doesn't what I tried work?

 

Ports are a concept of UDP and TCP. Ping messages are technically referred to as ICMP Echo Request and ICMP Echo Reply which are part of ICMP. ICMP, TCP, and UDP are "siblings"; they are not based on each other, but are three separate protocols that run on top of IP.

Therefore you can not ping a port. What you can do, is use a port scanner like nmap.

nmap -p 80 onofri.org

You can also use telnet onofri.org 80, as suggested in one of the other answers (It will give an error if the port is closed or filtered).

  • 3
Reply Report

You can use Paping, a cross-platform TCP port testing, emulating the functionality of ping (port ping)

(see also Github as code.google.com has been depreciated)

paping -p 80 google.com
  • 3
Reply Report