Ok, seems like this is a pretty common error, and it actually pains me that I haven't been able to solve it myself.
I'm using Socket, ServerSocket.
ServerSocket ss = new ServerSocket(52001);
What I have:
1 Server, running on a computer behind a router, consisting of an accept loop, and printing out IP's whenever something connects to it
ServerSocket ss = new ServerSocket(52001);
1 Client, which I use to test connecting to the server
Socket mySock = new Socket(args[0],52001);
im using port 52001, which to my knowledge isn't used for anything.
What doesn't work:
I cannot connect to the server using my routers IP (ie 69.**.**.** as seen from the internet , not the 192.168.... yadda yadda on the lan side). I have set up port forwarding on my router, but I don't think thats the issue.
What I have done and tested:
I CAN connect to the server using my computers LAN IP, (192.168.0.102). So this leads me to believe it is not a firewall issue, at least not on the server.
I have tried removing the router, and plugging my computer directly into the modem. This has also not worked, I am getting the same error. I called my ISP and asked if they block any incoming ports, and they said no. So it seems somewhere something is refusing my connection, and I can't seem to figure out why. Any idea's anyone?