Home » Questions » Computers [ Ask a new question ]

Configuring static IP address for using Remote Desktop Connection

Configuring static IP address for using Remote Desktop Connection

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.

Asked by: Guest | Views: 502
Total answers/comments: 2
Guest [Entry]

"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 address, 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 the 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 (RDP) port) to the computer you want to connect to. Unfortunately, exactly how that's done will vary depending on the 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 Connection 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 Connection. Then, when the router receives a Remote Desktop Connection 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 Connection 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"
Guest [Entry]

"Actually you can configure to use Remote Desktop Connection to all three machines from any location.

First, change two of three 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 machines to 3389, 3390 and 3391, respectively.

Second, go to the modem configuration page (it depends 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 the outside
Destination: 192.168.1.100 // Assumed that 192.168.1.100 is your private IP address of the machine that has Remote Desktop Connection port 3389
Destination port: 3389

Continue with the two others, and now you can access all three machines from the outside."