Report this

What is the reason for this report?

cannot open port 8080

Posted on April 21, 2014

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



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

You need to get rid of “iptables” if you want to edit /etc/sysconfig/iptables directly. So the line would look like this: <pre>-A INPUT -p tcp -m tcp --dport 8080 -j ACCEPT</pre>

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. <br>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

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.