Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a static IP address provided by my ISP. I have three machines at my home. I want to remotely access one of my machines (Windows Server 2003) using Remote Desktop Connection from any location. For example, I want my machine to accessible from my office.

I know there are free tools available on Internet that can do the same (LogMeIn), but I want to use my static address with a curiosity to learning new things. Although I am not a networking guy.

How can I do it?

share|improve this question

migrated from stackoverflow.com Jan 30 '10 at 14:08

This question came from our site for professional and enthusiast programmers.

3 Answers 3

up vote 10 down vote accepted

Since you "want to utilize" your "static address with a curiosity to learn new thing", here's a (slightly modified) excerpt from this article:

How can I connect to my home computer from work?

The first barrier is the location from where you want to access your computer at home. Make sure that no restrictions are in place regarding what protocols are allowed to access the internet (Remote Desktop protocol requires port 3389 to be open) to reach the internet.

You do have a static IP address at home, that makes things a lot easier (you'll always know what IP address to connect to, iIn fact, if you have a static IP, you can even register and assign a domain to it, so that you can access your home network by name - something like myhome.mydomain.com - rather than IP address).

The next barrier is your router. A router acts as a firewall, and prevents most connections coming in from the internet. Most people only connect out, to surf the web, download files or read email, so that's not a problem for them. But connecting from a remote location to your home is a connection coming in from the outside. The router needs to be configured to forward port 3389 (the Remote Desktop Protocol port) to the computer you want to connect to. Unfortunately, exactly how that's done will vary depending on kind of router you have - you'll have to check the documentation (or visit www.portforward.com).

You can access only one of your computers directly through your router this way. (There are techniques where you can specify that Remote Desktop listen on ports other than 3389. Then by using a different such port for each computer, and forwarding each through the router to the appropriate computer, you can connect directly to each).

The final barrier is your IP address on your LAN. Your IP address on the internet, whether static or dynamic, is assigned by your ISP and really identifies only one device: your router. Within your local network, the router then typically assigns local IP addresses to all of your computers. The router then handles making sure that all the data traveling between the computers on your local network and the internet all go to the right computers.

Those local IP addresses never leave your network - the internet sees only your router's IP address. So when you configure your router to forward port 3389 to a computer, you need to select one of your local computers, and configure its IP address as the destination for Remote Desktop. Then, when the router receives a Remote Desktop request from the internet, it forwards that request to the computer whose IP address you configured.

The "problem" is that your local network is, more than likely, using dynamic IP addresses. That means that the IP addresses that are assigned to each computer could change over time. If you leave your computers on all the time, the addresses won't change, and you're probably OK configuring the router with the current IP address of the computer you want to access remotely. If it ever changes, you'll need to update your router's port forwarding configuration for port 3389.

If that's unacceptable or inconvenient, the only real solution is to configure one of your computers to have a static IP address, and then configure the router to forward to that one as the Remote Desktop target. Depending on your router it can be as easy as:

  • Configuring the router to assign IP addresses from one range ... say 192.168.1.100 and up.
  • Configuring the TCP/IP properties of one of your machines to be a static IP, and defining it with a value out of that range - say, 192.168.1.2 (normally 192.168.1.1 is reserved for the router itself).

In many cases that's enough. In cases where other machines on your network cannot "see" this one machine, it may be necessary to add an entry to the "hosts" file on all the other machines that defines the static IP address for this one machine:

192.168.1.2 machinename
share|improve this answer
    
Wow............... What a nice explanation you have provided. Unfortunately i dont have sufficient reputations otherwise i have given you the 1 up vote. Thanks for providing such a wonderful information. –  IrfanRaza Jan 30 '10 at 14:40
    
@IrfanRaza - Of course, you can always bypass all the obstacles by using TeamViewer instead. :) teamviewer.com/index.aspx –  Molly7244 Jan 30 '10 at 15:20

This is something that is usually in your router setup. You need to give one of your machines a static local IP address and then configure the firewall rules to forward traffic to that machine depending on the ports used. Some routers also allow a dynamic dns link so you don't have to type in the number but can do username@dyndns.org.

share|improve this answer
    
Thanks Gazler but i am not getting clear idea. I have Huawei wireless router. Within router congifuration there is an Advanced tab having options like "static routing", "dynamic routing", "custom port forwarding" etc. Are you talking about the same..? –  IrfanRaza Jan 30 '10 at 14:24

Actually you can config to use remote desktop to all 3 machines from any location

First, change 2 of 3 machines' listening port by go to this registry key on each machine

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TerminalServer\WinStations\RDP-Tcp\PortNumber

The default port is 3389. For example, you can change the three machine to 3389, 3390 and 3391

Second, go to the modem config page (depend on your modem, you can find it in documentation). Navigate to NAT config or Port forwarding or whatever (depend on your modem) and add one entry for each machine

For example

Source port: 3389 //Which you use to connect from outside
Destination: 192.168.1.100 //Assumed that 192.168.1.100 is your private ip address of the machine that has remote desktop port 3389
Destination port: 3389

Continue with two others and now you can access to all 3 machines from outside

share|improve this answer
    
Thanks buddy! I will try to implement that. –  IrfanRaza Jan 30 '10 at 14:42
    
Rather than modifying the listing port in the registry, do the mapping in your router's port forwarding. There is no reason the source port needs to be the same as the destination port. So for example for a second machine use Source Port: 3390, Destination 192.168.1.101, Destination Port 3389 as the forwarding. That way you don't have to worry about the ports when using RDP on the LAN –  shf301 Jan 30 '10 at 15:38
1  
Unfrotunatly lots of SOHO routers still don't let you re-map ports. –  Ƭᴇcʜιᴇ007 Jan 30 '10 at 18:33

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.