By sundipmalik5
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!
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
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.