Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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 a server that is pingable from the public internet. I've just installed tomcat on 8080 port on this server. From the server itself I can see the main page come up when accessing http://localhost:8080 however, from the internet if I try http://myservername:8080 or http://myserverip:8080 it does not work.

What do I additionally need to do in order for this to be accessible from the public internet?

share|improve this question
up vote 3 down vote accepted

Per default CentOS has an iptables firewall running. For a quick check you can turn it off using "service iptables stop". Another place to have a look at is the server.conf from your Tomcat. Maybe it's only listening on your localhost interface.

share|improve this answer

What do I additionally need to do

Are the pings actually coming back from a firewall in front of the server? You would need to forward port 8080 through to the server, and add firewall rules to allow the connection.

Is it a Windows server? Does Windows Firewall allow the connection?

Is it a Linux server? Does IPTables (firewall) allow the connection?

share|improve this answer
For the first point, check if the IP on your machine (ifconfig) is really public, it should coincide what you see browsing to . If not, you are doing NAT, and you need to configure port-forwarding in your router. To check if it's iptables, a quick and dirty way is to stop iptables for a few seconds and check. – leonbloy Apr 26 '13 at 19:55
I turned off the iptables service and now I can access it from the public. Is there a way to just open port 8080? – Omnipresent Apr 27 '13 at 2:56
Yes. Add the right mystical incantation to just the right config file. This guide is for CentOS, and might help (using method one, add just one of the lines to each file, and put 8080 instead of 80. Add them right by the existing lines for port 80) NB. where it says to restart the service with service iptables start that should probably be service iptables restart. – TessellatingHeckler Apr 27 '13 at 2:59

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.