General discussion

Locked

Java Sockets, how to connect with no public IP

By blndo2001 ·
I did created a socket for connecting a Client to A Server. With Java you give the IP and the port no, this will work if you have a public Internet IP. How I can connect the client with the server if my ISP is not providing me a public IP. How this can work as messenger programs can work on any computer even with no public IP.

This conversation is currently closed to new comments.

1 total post (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

by JohnnySacks In reply to Java Sockets, how to conn ...

You do have a public IP, the problem is that it is a little hidden and can (and will) be changed periodically. If your computer is directly plugged into a cable modem, the IP can be found in the network properties. The Verizon DSL modem and other routers have a built in router that assigns you an internal IP address (like 192.168.xxx.xxx) and act as a firewall to block incoming requests. There's usually a built in web server admin tool in the router at http://192.168.1.1 or 192.168.0.1.

The 'public' IP address is listed as the WAN address, to get to a socket application, you will have to 'port forward' incoming requests for a specific port (eg, 80 for a web server) to your computer IP address, which you can make permanent on your internal network. See your router documentation, which may be poor and require a visit to their web site knowledge base.

For the changing IP address problem, check out a couple of the dynamic DNS sites http://www.dyndns.com for tools to create a domain name for yourself and re-assign the IP address as it changes.

Back to Web Development Forum
1 total post (Page 1 of 1)  

Related Discussions

Related Forums