cannot open port 8080

April 21, 2014 6.4k views
hi i am a newbie and i want to open port 8080 . i have added this iptables -A INPUT -p tcp -m tcp --dport 8080 -j ACCEPT in /etc/sysconfig/iptables and then service iptables restart but with no success
5 Answers
You need to get rid of "iptables" if you want to edit /etc/sysconfig/iptables directly. So the line would look like this:
-A INPUT -p tcp -m tcp --dport 8080 -j ACCEPT
From what you have wrote above you added in '/etc/sysconfig/iptables' the word iptables before the rule, the word iptables + rule is used only when you want to add a new rule from the terminal, "iptables" shouldn't be in the file.
Hope I helped. :)
Hi thanks for the quick response. I have removed the iptables and try to add the line in the config file of iptables as you both stated but i was not successfull in opening the port 8080 .can you plrase let me know the detail steps . thanks a lot for your time and the knowledge you have provided me . I would be really appreciate if you could let me know the steps to open port 8080
What's the output of "iptables -nL"

i'm with the same problem. My output for "iptables -nL" was:

Chain INPUT (policy ACCEPT)
target prot opt source destination

Chain FORWARD (policy ACCEPT)
target prot opt source destination

Chain OUTPUT (policy ACCEPT)
target prot opt source destination

Have another answer? Share your knowledge.