Take the 2-minute tour ×

In order to allow input from port 8443, I have inputed the iptables rule:

-A INPUT -i eth0 -p tcp --dport 8443 -j ACCEPT

However, when I type:

$ netstat -a

There is no reference to https or 8443. The result is:

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               omitted                 ESTABLISHED
tcp        0      0 localhost:6311          localhost:48872         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 localhost:48872         localhost:6311          ESTABLISHED
udp        0      0 *:mdns                  *:*                                
udp        0      0 *:52703                 *:*                                
udp6       0      0 [::]:42168              [::]:*                             
udp6       0      0 [::]:mdns               [::]:*     

How can I successfully open port 8443?


share|improve this question

migrated from stackoverflow.com Dec 13 '11 at 20:37

This question came from our site for professional and enthusiast programmers.

What makes you think that you didn't open port 8443? netstat -a lists the ports on which something is listening, not the ports that are open w.r.t. the firewall. –  Rob Dec 13 '11 at 20:23
Ah, so if 8443 isn't appearing on netstat -a it means that Tomcat is not working with it? I mean, can I conclude that the problem is with Tomcat and not with firewall? –  jdanielnd Dec 13 '11 at 20:31
That is the conclusion that I would draw. –  Rob Dec 13 '11 at 20:32
I have changed some Tomcat configurations and now it appears on netstat -a. However I still can't ping or access 443. What else could be blocking it? –  João Daniel Dec 13 '11 at 20:52
ping is not the right tool for testing a TCP port, because ping uses ICMP. –  Ben Voigt Dec 13 '11 at 21:02
add comment

1 Answer

iptables will only allow the port to get in, it will not "open" the port!

If you want to check what ports are allowed by iptables, you should you iptables -L -nv

share|improve this answer
Also, since the rule is appended above, you will want to make sure that there isn't a rule with higher precedence to reject or drop it before the rule to accept is processed. –  Aaron Copley Dec 13 '11 at 20:43
There was a "drop all" rule before it. However, even if I change the order and let the DROP rule as the last, I can't access or ping localhost 443. –  João Daniel Dec 13 '11 at 20:50
add comment

Your Answer


