Ping a specific port

You cannot ping directly ports, because ICMP doesn’t have this concept of ports. But if you need to ping a specific port, to check if a server has a connection opened use the following command:

boobo94:~$ nc -vz 1.2.3.4 6379
Connection to 1.2.3.4 6379 port [tcp/*] succeeded!

Works on both Linux and Mac from terminal.

Leave a Reply

Your email address will not be published.

%d bloggers like this: