java - Hosting a server on a private IP address -


a server application, written in java, hosted on ip address provided router. how can client connect from anywhere server though server doesn't have public ip, ip address provided router using nat translation?

you need configure port forwarding on router.

  1. the clients "anywhere" connect router public ip address , port used application (or different port, port need define).
  2. the router use port forwarding configuration find ip address , port incoming connection on port shall forwarded to.
  3. your router establishes connection server.

a disadvantage of having server behind router using nat gets complicated if want have https connections.


Comments