Question

Im using TCP/IP sockets in java to try and create a client-server application. The program works fine when run locally and also over the local area network, but when I use the internet IP address the clients connection is refused.

I used this website to get my IP address and have added a firewall entry to unblock the port im using (port 4445).

I am almost certain the problem lies in some sort of security measure that is blocking the port. Does it matter that I'm running the client and server on the same PC but using the IP address from the previously mentioned website?

If I could get a list of ways to test the port is in fact open, or a list of things to try in order to get my program running, that would be great!

Was it helpful?

Solution

That website may very likely give you the IP address of the gateway through which your PC is connecting to the internet, and if the gateway is out of your control (which is most of the cases as far as I know) there's nothing you can do to use that IP address to test your program. Here's some advice:

  1. Try http://aws.amazon.com, once registered you have one-year free access to a micro-server (which can be accessed publicly through DNS/Elastic IP.)
  2. If your PC have a public IP address, you don't need that website to find out what it is. Just check your network adapter control panel.

OTHER TIPS

Where is the server has been located? If your server is located in some commercial hosting, there is possibility that the ports you use are blocked. Also if you use modem with router or just router in your local network you should check nat table.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top