Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have opened port 443 through iptables:

pkts bytes target prot opt in  out source     destination
  45  2428 ACCEPT all  --  lo  *
   6  1009 ACCEPT tcp  --  *   * tcp dpt:80
 141 10788 ACCEPT tcp  --  *   * tcp dpt:22
   0     0 ACCEPT tcp  --  *   * tcp dpt:80
   0     0 ACCEPT tcp  --  *   * tcp dpt:443
   7  1140 ACCEPT all  --  *   * state RELATED,ESTABLISHED
   6   360 DROP   all  --  *   *

And it is listening as netstat -a indicates:

Proto Recv-Q Send-Q Local Address           Foreign Address         State      
tcp        0      0 *:6311                  *:*                     LISTEN     
tcp        0      0 *:ssh                   *:*                     LISTEN     
tcp        0      0 gauss:ssh               ommited                 ESTABLISHED
tcp        0      0 gauss:ssh               ommited                 ESTABLISHED
tcp6       0      0 localhost:8005          [::]:*                  LISTEN     
tcp6       0      0 [::]:8009               [::]:*                  LISTEN     
tcp6       0      0 [::]:www                [::]:*                  LISTEN     
tcp6       0      0 [::]:ssh                [::]:*                  LISTEN     
tcp6       0      0 [::]:https              [::]:*                  LISTEN     
udp        0      0 *:mdns                  *:*                                
udp        0      0 *:52703                 *:*                                
udp6       0      0 [::]:42168              [::]:*                             
udp6       0      0 [::]:mdns               [::]:*   

However I can't ping port 443:

PING 443 ( 56(124) bytes of data.
--- 443 ping statistics ---
7 packets transmitted, 0 received, 100% packet loss, time 6006ms

What's going on?

share|improve this question
5 can't ping ports. You should read this. – MDMarra Dec 14 '11 at 15:47
Even if you could ping a port, you need something on that port that understands the ping and responds appropriately. Chances are you have a web server on that port and web servers don't speak ping. – John Gardeniers Dec 21 '11 at 6:24
It may be helpful to get familiar with the OSI Reference Model. You can ping an IP (layer 3) address, but ICMP does not understand TCP (layer 4) port numbers. – Skyhawk Apr 4 '12 at 19:24
up vote 29 down vote accepted

The ping utility does what it's supposed to, hit the ping interface using ICMP, you can't just ping any port you like with it. I'm sure there's a million ways to do it but most people just use 'telnet IP port', i.e. 'telnet 25' to test connection.

share|improve this answer
^-- this. telnet works. so does tcping – RobotHumans Dec 14 '11 at 3:13

You can't ping ports. What is happening is that 443 is being converted into an IP address and ping is attempting to contact that address (

share|improve this answer

PING 443 ( 56(124) bytes of data.

Notice the IP address above is interpreted from the number 443 (1 x 2561 + 187 x 2560 = 443).

ICMP (of which ping is a part of) is its own protocol on top of IP. UDP/IP, TCP/IP, and ICMP/IP. There are no ports involved in the ICMP protocol, so there's no port number option on the command line.

There are TCP ping applications that will perform similar functionality over TCP, and you may want to look at those. Manual review of TCP ports or services is often done using telnet or nc (netcat).

share|improve this answer

Try using NMap for your port pings.

nmap -p 443

Starting Nmap 5.61TEST1 ( ) at 2011-12-13 13:19 Pacific Standard Time
Nmap scan report for somecomputer (
Host is up (0.00s latency).
443/tcp closed https

Nmap done: 1 IP address (1 host up) scanned in 0.64 seconds
share|improve this answer
This is what I would have answered. +1 – Tim Dec 20 '11 at 20:32

Have you considered that ICMP cannot be used to test for connectivity to TCP/IP ports?

Use a tool like telnet or nmap to test the open or closed state of a port. Here's an example using Telnet to test for VMware connectivty. Here's some info on port scanning with nmap.

share|improve this answer
Hum, how should I test if my 443 port is receiving data? The address is not responding and I don't know where the fault is. Thanks! – João Daniel Dec 13 '11 at 21:12
@jdanielnd I updated my answer. – Wesley Dec 13 '11 at 21:16
Or use netcat: nc -zvw 5 443. – Steven Monday Dec 13 '11 at 23:02

This is not the way to do it at all. ping sends ICMP echo requests packets!

What you want is probably telnet xxxx 443, where xxxx is your host name (C-c to interrup telnet and then exit).

share|improve this answer
Ah ok! Thanks! I did it and got a Connection refused. I'll look it up! – João Daniel Dec 13 '11 at 21:15

Am I reading this wrong, or are you only listening on port 443 for IPv6?

Are we safe to assume you're trying to set up a web server? If you're trying to set up apache or some other web server, it's not listening on port 443 for ipv4 traffic. Either it's configured incorrectly or you don't have the daemon running.

share|improve this answer
Ah, it seems that might be the problem! Thanks! – João Daniel Dec 13 '11 at 21:23
I'm not sure how to deal with it! Is it possible that I'm listening for both? I can access localhost:80 on my browser. Does Tomcat have any configuration about IPv6? Thanks! – João Daniel Dec 13 '11 at 22:08
I'm not a Tomcat user, so I can't help you there. I'm sure if you create a new question and paste your tomcat config you'll be able to get some help. – Safado Dec 13 '11 at 22:09
Ok, thanks! I'll look for it! – João Daniel Dec 13 '11 at 22:11

I strongly recommend you take basic networking classes (no offense intended). Network administration is a highly technical job that should be taken seriously.

ping generates ICMP echo-request packets, the ping command is not intended to operate on upper networking layers.

The notion of "ports" is only relevant for UDP and TCP protocols. Ports are used by the TCP/IP stack as a hint to demultiplex IP packets data and deliver them to the right application.

As for what you are trying to do, I personally use the nc -v hostname port command.


share|improve this answer

If you want test if the port is open you can use telnet. Just like

telnet 443
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.