views:

63

answers:

4

Hello, I'm developing a remote desktop application that enables users to connect remotely to a machine that does not have a static IP. How can I locate such a machine? there is a site logmein.com that installs a client to the machine to allow remote desktop. I don't know what this client do exactly to allow this process! Thanks.

+2  A: 

The easiest way is probably to have a small utility installed on your target server which periodically reports its IP and name to a web service somewhere. Your client then queries the service to determine the current IP address of the server and connects as normal.

(Obviously you'd want to have a more complex way of tracking which server is which than just the name - there's nothing stopping two or more servers reporting the same name and different addresses to really throw things for a loop)

ZombieSheep
+1  A: 

Logmein knows the IP of your remote machine because the remote machine is connected to Logmein.

Teamviewer is also doing similar thing than Logmein, but requires user action on the remote machine.

I now use Logmein, but I used dyndns.org in combination on VNC for years with lot of success.

Dyndns.org lets you define a host with a very short TTL. So each time the IP address of your machine change, it will tell Dyndns.org what is the new IP, so the host will always point to it.

So regardless the method you use to connect to your remote machine, use a service like dyndns.org or build one.

So to solve your problem, you must use

Pierre 303
Thanks a lot but what if the remote machine is behind a router
Hadad
Pierre 303
That's great but how I can implement this in .net?I'm using The microsoft terminal services library to connect to a static ip machines but will it help me in the new scenario?
Hadad
Use a proxy tunnel. http://proxytunnel.sourceforge.net/
Pierre 303
+1  A: 

I don't know the LogMeIn site, but http://copilot.com uses a server in the middle. Also Live Mesh and Microsoft Groove uses this approach.

Both the PC's connect to the server in the middle (the server has a fixed IP), and the server dispatches the signals. This will also bypass all (most) firewalls, because there are only outgoing connections.

GvS
+1  A: 

Steps:

  1. Because using dynamic ip is not a good idea, you must have a domain name to refer to your computer on the internet. In case you have no one, visist a registrar site (www.dnsexit.com or www.dyndns.com or others), and get one from it. The cost at most 15 us dollar per year.

  2. If your computer is behind a NAT router, set your computer with a static IP, and setup the router to forward incoming request on port 3389 to your computer IP. Port 3389 is a default IP for remote desktop. You can change it if you want by editing windows registries. If you computer is directly connected to ISP (without router), just proceed to step 3.

  3. Register a free new account for dynamic DNS with dynamic DNS site (such as www.dnsexit.com, www.dyndns.com, others). You will use this id and password in step 4.

  4. Download an updater application from the dynamic DNS site with which you register in step 3. Install it on your computer and run. You will be prompted to enter id and password. Usually this updater works as a windows service.

  5. Try to connect to your computer from the internet (not LAN). If you fail, please make sure your security program does not block the port 3389.

xport
If you still have problems, let me know. I hope I can help you well.
xport