Allowing access to localhost outside network

You need to check the following, in roughly this order:

Local Computer:

  • Firewall: Allow incoming connections on the required port.

  • Server: I've not used Tomcat, but you should ensure it is configured to allow connections from other IP addresses, it may be configured to only work locally.

At this point, it is worth testing that you've got this right by connecting to the LAN IP of this computer from another machine on the same LAN. Otherwise you risk spending a lot of effort messing around in the later steps to find this is blocking the entire process

Local Router:

  • Port Forwarding: Forward all inbound connections to the required port on to the IP of the local computer with the same port*. This is easier if the local computer has a fixed IP, but will work if it is DHCP but requires a little more caution (you just might have to check the configuration each time).
    **This isn't strictly necessary, you could have external port 80 forwarded to the relevant port, allowing the third party to use just the IP address, and not have to use the port in the URL.*

Internet Connection

  • Port Blocking: Some ISPs block inbound ports to prevent home users from using a (cheaper) home connection for business purposes. You could try a non-standard port number to see if this helps.

Third Party:

  • Connection: You need to give them your WAN IP address, your router should be able to tell you what this is. Otherwise, try something like http://whatismyip.com/ to find out what you IP is.
    They then need to visit http://<IPAddress>:<port>/