ping ip with port

 

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 and check if ip/host and port are accessible.

$ nmap -p 80 www.google.com

Output:

Starting Nmap 6.40 ( http://nmap.org ) at 2015-12-02 14:38 IST
Nmap scan report for http://www.google.com (74.125.200.106)
Host is up (0.085s latency).
Other addresses for http://www.google.com (not scanned): 74.125.200.147 74.125.200.104 74.125.200.103 74.125.200.105 74.125.200.99
rDNS record for 74.125.200.106: sa-in-f106.1e100.net
PORT STATE SERVICE
80/tcp open http

Nmap done: 1 IP address (1 host up) scanned in 0.64 seconds

You can also use telnet onofri.org 80

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s