Terminal window

Ping server on a specific port

By

in

The ping command is used to check if the source computer can reach a specific destination computer. It’s a simple way to verify that a computer can communicate with another computer or network device.

The only drawback is that you can’t ping on specific 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

The output will look like this:

nmap -p 80 google.de
Starting Nmap 7.92 ( https://nmap.org ) at 2021-12-08 10:59 CET
Nmap scan report for google.de (142.250.185.131)
Host is up (0.017s latency).
rDNS record for 142.250.185.131: fra16s50-in-f3.1e100.net

PORT   STATE SERVICE
80/tcp open  http

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

Source: https://serverfault.com/questions/309357/ping-a-specific-port



Comments

Leave a Reply

Your email address will not be published. Required fields are marked *