0

I have created a web application in netbeans with a apache tomcat server. I want to be able to acces the server from the web. I am behind NAT, will the project be accessible? From my computer i access the project with http://localhost:8084/equinox/ , from a different network will I be able to access this website if I change localhost with the external IP or is there something more I should do.

Borut Flis
  • 105
  • 1
  • 3

1 Answers1

3

You will need to make sure the following are true:

  1. Tomcat is bound to an IP address that isn't just localhost. Ie. it must be able to accept remote connections

  2. You configure the NAT to forward an external port to the correct IP address and port that your tomcat is running on

  3. You configure whatever firewall that is in the way to allow TCP traffic to/from this host on that port.

growse
  • 8,020
  • 13
  • 74
  • 115
  • How can I make the first thing true. What to do? – Borut Flis Aug 27 '12 at 21:39
  • if you do a `netstat -tan` | grep 8084`, you should be able to see if tomcat is listening on `127.0.0.1` (which you don't want) or `0.0.0.0` which you probably do want. If the former, you'll need to configure the `address` part of the HTTP connector in your tomcat config file. See http://tomcat.apache.org/tomcat-6.0-doc/config/http.html. – growse Aug 28 '12 at 09:22