I wrote my own server in Java and I’m kind of a noob. The client program connects to my IP Address at port 5000 over a TCP connection. When I run the server and the client on the same machine, it connects and the server is saying the incoming IP Adress is 127.0.0.1 – localhost. When I run the client on a seperate machine, it never connects. I know I fixed this problem a while ago by changing some router settings but I forget how. Could someone explain to me in simple terms how to fix this? My router is verizon and I’m using Windows Vista.
Share
If you run the client on the remote machine but your server is “shielded” by a router from your ISP, then you must change the settings on the router. Basically you must say to your router: If someone from the outside wants to reach me on port xyz, then, dear router, please forward this to my computer. The term is ususually “Port Forwarding”, “Demilitarized Zone”, “Incoming Connections”, “Network Address Translation (NAT)” or something like that.
Note: The other way around is no problem: If YOU want to connect to a server on the outside, the router manages that automatically.