|
To use Remote Desktop to reach your computer from the Internet, both the computer and your Internet connection must always be up and running. In addition, you must be able to make connections from the outside world to your computer, so there are additional requirements:
-
If you use dial-up Internet service, you'll need someone at home to establish the connection before you can connect to your computer.
-
If you use cable or DSL Internet service, you must either have a static IP address assigned by your ISP, or, you must use a dynamic DNS client on your computer or router to notify a dynamic DNS name service provider every time your connection's IP address changes.
-
If you use a connection sharing router or use an Internet connection provided through Windows Internet Connection Sharing on a different computer, you must configure the sharing device or computer to forward incoming TCP connections on port 3389 to your computer.
If you can forgo access from the outside world, you also use Remote Desktop just within your own private network at home or work with far less setup trouble, as I'll note later on. The initial steps are the same.
Note
If your computer is part of a corporate network, be sure that your organization's security policies permit you to enable Remote Desktop connection. On a Windows Domain network, Remote Desktop might even be disabled by the Group Policy feature.
Also, if your Internet Service Provider is AOL, or if you use a free advertisement-subsidized Internet service, you will not be able to establish Remote Desktop access to your computer.
The following sections describe the setup procedure. Perform all of these steps while logged in as a Computer Administrator.
Step 1 Enable Remote Desktop
The first step in configuring Remote Desktop Connection is to enable the connections at your computer, using this procedure:
1. |
Right-click My Computer and select Properties. Or, open the System control panel applet.
|
2. |
Select the Remote tab and check Allow Users to Connect Remotely to This Computer.
|
3. |
Computer Administrator users can connect without explicit permission. If you want to grant Remote Desktop access to Limited Access or Power User user accounts, click Select Remote Users and check the boxes next to the usernames.
In any case, however, only accounts with passwords can be used. Windows will not grant access to any user account that does not have a password set.
|
4. |
Click OK to close the dialogs.
|
Enabling Remote Desktop should automatically create an exception in Windows Firewall so that connections will be allowed in. However, you should confirm this.
Step 2 Open Your Firewall
To check the Firewall settings, open the Control Panel and Windows Firewall. Select the Exceptions tab and locate the entry for Remote Desktop Connection. Select the entry and check its check box if it is not checked already. Then, click Edit, and be sure that under Scope the word Any appears. If it doesn't, click Change Scope and select Any Computer. Click OK to close all of the dialogs.
If you use a third-party firewall program, you must instruct it to open access to TCP Port 3389 for all IP addresses, following the instructions for your particular firewall product.
At this point you should be able to connect to your computer from any other computer on your network using Remote Desktop Connection. If you do have another networked computer, you should test this now to be sure that the first two steps have worked. Note the name of the computer you just set up (if you don't know it, right-click My Computer, select Properties, view the Computer Name tab, and make a note of the name after Full Computer Name). However, if the name ends with a period, drop the period.
Note
If you only want local remote desktop access, you can stop at this point. This is actually useful enoughmy friend Bob totes a small, slow, wireless-enabled laptop around his house, and uses it to access his primary desktop Media Center computer, mainly for email, but also to control his sound system, TV recorder, and so on.
When you know that Remote Desktop is working correctly in-house, you'll have to provide a way to access to your computer from the outside world.
Step 3 Set a Static IP Address
If your computer makes its Internet connection directly, has a fixed IP address assigned by your network manager, or gets its Internet connection through Windows Internet Connection Sharing, you can skip this step.
However, if you use a hardware connection sharing router device, you'll have to configure your router and your computer so that your computer has a static or fixed IP address.
There are two steps involved: You must select a fixed address in the correct range for your network, and, you must configure your router so that it does not give this address to any other computer.
Most routers automatically assign IP addresses to the computers on your network, and they typically look like 192.168.0.3 or 192.168.1.101. The first two numbers are almost always 192 and 168. The third number varies from manufacturer to manufacturer. It's usually 0 or 1, but it doesn't really matter, so in this section I'll use x in its place; just be sure to make note of the actual number your router happens to use. The fourth number is the only number that is different for each device and computer. It's usually 1 for the router itself, and a number between 2 and 254 for computers.
My recommendation is that you use addresses 192.168.x.200 through 192.168.x. 254 for any computers or devices such as print servers that need a fixed address, and let your router pass out dynamic addresses from 192.168.x. 2 up or 192.168.x. 100 up. Most routers have a configuration screen that lets you set this; it may be on the main LAN setup page or it may be on a menu labeled DHCP.
While you are doing this, also make a note of the IP address assigned to the router itself (it's 192.168.0.1 in the figure), and the Network Mask or Subnet Mask value.
For the static addresses in the range 192.168.x. 200 to 192.168.x.254, you'll have to manually keep track of which addresses are available and which are free.
Tip
I recommend keeping a list of used and unused IP addresses on paper, in a file folder along with printed screen shots of all of your computer and network configuration screens and dialogs, to have on hand in case of an emergencyyour network setup is too valuable to lose in a disk crash!
You will also need to know IP address or addresses of the Domain Name Service (DNS) Servers provided by your ISP. To find them, check your ISP's tech support web pages, view the setup screen on your router to see if you entered this information there, or, go to a computer that has a functioning Internet connection, open a command Prompt Window, type the command ipconfig /all and press Enter, and note the address or addresses listed after DNS Servers. Jot this information down for use later on.
To configure your computer, select an unused number from the list of static addresses, and follow these steps:
1. |
Open Network Connections, right-click the network adapter's icon (usually labeled Local Area Connection) and select Properties.
|
2. |
Select Internet Protocol (TCP/IP) and click the Properties button.
|
3. |
On the General tab, select Use the Following IP Address.
|
4. |
For the IP address, enter one of the available IP addresses from your list, for example, 192.168.x. 2, but with the correct digit instead of x.
|
5. |
For the Subnet mask, enter the mask value you recorded from the router's setup screen. It's usually 255.255.255.0.
|
6. |
For the Default Gateway, enter the IP address of the router itself. It usually ends in .1.
|
7. |
For the Preferred DNS Server, enter the first DNS server address you noted earlier. If there was just one, leave the Alternate DNS server blank; otherwise enter the second address.
|
8. |
Click OK, wait 10 seconds or so, and then test the Internet connection by trying to view a web page.
|
Remember to write down the IP address you used, and the name of the computer to which you assigned it.
Step 4 Enable Port Forwarding
If younuse Windows Internet Connection Sharing or a connection sharing router, you'll have to instruct your sharing computer or router to forward incoming Remote Desktop connections from the router's public connection to your private network and thence to your computer. Specifically, you'll have to set up your sharing computer or router to forward incoming requests on TCP port 3389 to the computer that you want to reach through Remote Desktop.
If you use a connection-sharing router, it will have a setup menu option titled Port Forwarding or Applications. You sometimes have to select the Advanced menu to find it. Make an entry to forward TCP port 3389 to the IP address of the host computer.
If you use Windows Internet Connection Sharing, go to the computer that is sharing its Internet connection, log on as a Computer Administrator, and follow these steps:
1. |
Open Network Connections and locate the icon for the shared connection (it will be labeled as Shared).
|
2. |
Right-click the icon and select Properties. View the Advanced tab. Under Internet Connection Sharing, click the Settings button.
|
3. |
In the Services list, locate Remote Desktop Connection and check it. The Services Settings dialog will appear. Enter the name of the computer that you will be connecting to with Remote Desktop, or, if it has a static (fixed) IP address, enter the IP address.
|
4. |
Click OK to close the dialogs.
|
The next step is to ensure that your computer will be reachable when it's needed.
Step 5 Establish a Permanent Connection
Many consumer-grade broadband Internet services provide temporary connections, requiring a username and password to establish a connection that lasts until a certain amount of time has passed with no data traffic, or until you force a disconnection. Dial-up Internet service is always connection-based, and DSL service often is as well, using a scheme called Point-to-Point Protocol over Ethernet, or PPPoE. Cable Internet service is usually "always on" but some cable providers also use PPPoE. This helps conserve the limited number of IP addresses allotted to your Internet Service Provider, but it's no good if you have to be sitting in front of your computer to establish a connection in order to connect to it remotely! So, if you have a connection-based Internet service, you'll need to configure your computer or sharing router to keep the connection open all of the time.
If you are using a broadband connection sharing router device, its setup screen should have an option to keep the connection on permanently. The means varies from one manufacturer to another, but it's usually there. Enable any settings that mention establishing a connection automatically, sending Keep Alive packets, and if there is a setting for disconnecting after a certain amount of time idle, set it to zero or Never.
If you establish your Internet connection directly from Windows XP using an icon on the Network Connections window, either at a solo computer, or on a computer that shares its connection with Internet Connection Sharing, follow these steps:
1. |
Open Network Connections, and locate the icon for your Internet connection; this is the one that you set up with the username and password required by your ISP.
|
2. |
Right-click the icon and select Properties.
|
3. |
View the Options tab, and make the following changes: Set Redial Attempts to 20, Time Between Redial Attempts to 10 seconds, Idle Time Before Hanging Up to Never, and check Redial If Line Is Dropped.
|
4. |
Click OK, and establish the connection.
|
If your computer is sharing this connection with Internet Connection Sharing, the connection should stay up as long as your computer is powered on. If the connection is not shared, it will stay up as long as your computer is turned on and your account stays logged on. It's not ideal, but it'll work for a while. (You might consider getting a connection-sharing router device just so that you can let it do the job of keeping your connection up; it shouldn't cost more than $20, and will do a much better job.)
Caution
This type of always-on connection can be even be set up with a standard dial-up or ISDN connection, but before you try it be sure that you aren't going to be charged on a per-minute basis, or you could be in for a very nasty surprise when the next phone bill arrives.
Additionally, if you want your computer to be remotely accessible at all times, you should anticipate that a power failure might occur while you're away. You may want to configure your PC's BIOS to automatically turn the computer on after a power outage. Dell computers label this setting "AC Power Recovery." Other manufacturers use different terms.
Step 6 Obtain a Domain Name Service (DNS) Name
Lastly, to reach your computer from the Internet, you'll need to know the IP address of the Internet connection used by the computer you're contacting. If you have business-class Internet service, your computer may have a public, static (fixed) IP address and you may have domain name service set up so that you can use a name like "maggie.mycompany.com" to reach your own computer. If so, you're finished, and can go ahead and try to connect to your computer using Remote Desktop. Some ISPs will also provide static IP addresses for single-computer customers, for a moderate fee.
However, the majority of us use consumer-grade dial-up or broadband Internet service, where your IP address can change every time a connection is made, or at least every few days or weeks. In this case, you present a moving target to the Internet, and in order to connect to your computer from "outside" you need a way to find out what its IP address is.
What you need is called Dynamic Domain Name Service (DDNS). There are several free DDNS services, but to keep this short I'll describe how to use only one, dyndns.org. Dyndns.org maintains DNS servers whose job it is to turn hostnames like joebob.homedns.org into IP addresses. You simply register and set up an account, choose a hostname, and configure your computer or router to automatically notify dyndns.org when your network's external IP address changes. That's the dynamic partthe address gets updated without any manual intervention. When this has been set up, the selected hostname will be recognized anywhere on the Internet and will return your router's current external IP address.
There are two steps to setting up DDNS service: creating an account at dyndns.org, and configuring your network to send updates when its IP address changes. I'll describe the basic, free service here.
To set up service at dyndns.org, follow these steps:
1. |
Visit www.dyndns.org and click Sign Up Now. Read and check acceptance of the Acceptable Use Policy, select and enter a username, enter your email address, select a password, enter any optional information you feel like entering, and click Create Account. Be sure to write down your logon name and password to keep in your network setup file.
|
2. |
Check your email for a message from dyndns.org, and double-click the URL it contains to confirm your account.
|
3. |
Click login, and enter your username and password. Click Login.
|
4. |
Click My Services, Add Host Services, Add Dynamic DNS Host.
|
5. |
Make up a hostname, and select a domain name from the drop-down list. The combination of the two will be the name you'll use when you connect to your computer with Remote Desktop, so choose something easy to remember; it might be something like joebob.homedns.org. Write the combined hostname and domain name down to keep in your network setup file.
|
6. |
Leave the IP address as is, leave Enable Wildcard unchecked, and leave the Mail Exchanger field blank. Click Add Host to create the entry. If no one else has used the same combined hostname and domain name, it should work; otherwise you might be asked to make a different selection.
You can return to the My Hosts list later and edit this information. To change the host or domain name, however, you must delete the host and add a new one.
|
Now, the host and domain name combination you selected is online and available anywhere on the Internet. It will resolve to your current IP address, though, and you must now take steps to ensure that it's updated when your IP address changes.
If you use a hardware connection sharing router, see whether it has built-in support for DDNS. Some do, including some models by DLink, Linksys, and others. If it does have DDNS support, enable it and enter the dyndns.org account name, password, and full host name (including the domain name) that you set up in the previous steps; When you save the settings, see if your router displays a status message indicating that it successfully contacted and updated dyndns.org's records. If so, it should now keep your selected hostname updated with your current IP address at all times.
Note
Although dyndns.org updates its database instantly when your router or DDNS client program notifies it of a change, ISPs can elect to hang on to (cache) address information for an arbitrary amount of timeminutes to hours. If your home network's connection goes down and comes back up with a new IP address, you might have trouble re-establishing a Remote Desktop connection to it until the ISP you're using allows the cached address to expire and finally queries dyndns.org for the current one.
Also, dyndns.org will drop any hostnames that are not updated at least once a month, unless you upgrade to a higher service level for a fee. Some routers fail to send DDNS updates if their IP address never changes, which often is the case with cable Internet service. So if you get an email saying your hostname was deleted, you'll have to re-create it, and do one of these four things to prevent it from being dropped again: (1) see whether your router manufacturer has a firmware upgrade that fixes this problem, (2) get a new router with better ddns firmware, (3) upgrade your dyndns.org service to eliminate the six-month limit, or (4) use a software DDNS update client.
If your router can't send DDNS updates or you do not use a hardware connection sharing router, you can still maintain your DDNS records using a software DDNS update client. This is a program that runs on one of your computers and periodically updates dyndns.org whenever your IP address changes, but at least once every few weeks so that your hostname is not dropped. Dyndns.org has a recommended DDNS update client it calls the "Official Windows Update Client," but unfortunately this program runs only when you are logged on, which is of no use if you're away for an extended period. You should use a DDNS update client that runs as a Windows service on one of your computersthe Remote Desktop host computer would be the best candidateso that it is always active whether anyone is logged in or not.
Some DDNS update clients that run as Windows services you might want to investigate are inadyn from inadyn.ina-tech.net (free, but with the current version, installation is not for the faint of heart), myDynamicIP from www.roconsoftware.com (shareware, $15 Canadian), and DirectUpdate from www.directupdate.net (shareware, $19 US). By the time you read this, a new version of inadyn should be available that is easy to install and use, so I'd check it out first.
When your dynamic DNS hardware or software configuration is set up and working, you should be able to test the connection to your computer by connecting to it with the Remote Desktop client from another computer, via the Internet.
Connecting to Your Computer with Remote Desktop
To establish a connection to a computer that's been set up to receive Remote Desktop connections, you'll need a copy of the Remote Desktop Client, also called the Terminal Services Client. There are several ways you can get this program:
-
It's preinstalled on Windows XP computers. Select Start, All Programs, Accessories, Communications, Remote Desktop Connection.
-
It's on your Windows XP CD-ROM. Insert it in another Windows computer, and from the setup program select Perform Additional Tasks, and then Set Up Remote Desktop Connection. This will run the installation program.
-
You can download it from www.microsoft.com. Search for Remote Desktop Client.
-
On Apple Macintosh computers running OS X, download the Mac version from www.microsoft.com/mac; click on View All Downloads and scroll down to Other Products to find it.
-
For UNIX and Linux, there is an open-source version under development that runs under X11. Check www.rdesktop.org or sourceforge.net/projects/rdesktop.
-
If you are using a Windows computer on which you don't have sufficient privileges to install new software, you can use an ActiveX version of the client that runs within Internet Explorer. Search microsoft.com for Remote Desktop Connection Web Connection Software Download. Download and run the software and install it in a temporary folder. Open Internet Explorer and click File, Open, Browse, and then locate the file default.htm in the folder into which you installed the software. If Internet Explorer warns you about running Active content, permit it to do so. You should then be able enter the DNS name of the remote computer and click Connect.
When you run the Remote Desktop Client, you'll see the Remote Desktop Connection dialog
Enter the IP address or registered DNS name of the computer you'd like to use. If you want to connect to a computer using an alternative TCP port number, enter a colon and the port number after the IP address or name, as in remote.mycompany.com:3391.
Entering a username and password at this point is optional. If you don't enter them now, you'll be asked for them when the connection is established. Click Connect to establish the connection immediately, or click Options to adjust the connection properties first. The properties tabs are described in the table below.
Remote Desktop Connection Properties
| Tab |
Properties |
| General |
Connection Settings saves the configuration for a particular remote computer as a shortcut for quick access later. |
| Display |
Sets the size and color depth of the window used for your remote connection's desktop. Display size can be set to a fixed window size, or Full Screen. |
| Local Resources |
Connects devices on the local computer so that you can use them as if they were part of the remote computer. (This feature does not work when connecting to Windows NT and Windows 2000 Terminal Services.) |
| |
The Keyboard setting determines whether special Windows key commands like Alt+Tab apply to your local computer or the remote computer. |
| Programs |
Lets you automatically run a program on the remote computer upon logging on. |
| Experience |
Lets you indicate your connection speed, so that Windows can appropriately limit displayintense features like menu animation. |
When you establish the connection, you'll see a standard Windows logon dialog. Enter your username and password to sign on. It may take awhile for the logon process to complete, if Windows has to switch out a logged-on user.
When you're logged on, you'll see the remote computer's desktop, and you can use it as if you were actually sitting in front of it. Keyboard, mouse, display, and sound should be fully functional. If you maximize the window, the remote desktop will fill your screen. It all works quite wellit can even be difficult to remember which computer you're actually using!
In addition, any printers attached to your local computer will appear as choices if you print from applications on the remote computer, and you enabled them before you established the connection, the local computer's drives will appear in the list in My Computer. You can take advantage of this to copy files between the local and remote computers, although it's rather slow.
Finally, your local computer's serial (COM) ports will also be available to the remote computer. (My friend Norm syncs his Palm Pilot to his Windows XP Professional computer at home using this feature.)
Tip
If the computer to which you connect has multiple monitors, you may find that an application seems to be running, but you can't make its window appear. What's happened is that it's positioned offscreen, where it would be on the second monitor that doesn't exist in the Remote Desktop world. To move it into view, right-click the application's button in the task bar. If Minimize is grayed out, click Restore, and then right-click again. If Maximize is grayed out, click Restore, and then right-click again. Select Move, and use the left or right arrow key to bring the window into view.
While you're connected, you might want to use keyboard shortcuts like Alt+Tab to switch between applications on the remote computer. By default, this won't work, because they will be interpreted by the local computer and Alt+Tab will simply switch you away from the Remote Desktop application. However, you can specify which computer should be the one to interpret special key combinations on the Local Resources properties page, as I described earlier, or you can use alternate key combinations to ensure that the desired actions take place on the remote computer. The alternate keyboard shortcuts are shown in the table below:
Some of the Remote Desktop Keyboard Shortcuts
| Use These Keys: |
To Transmit This to the Remote Computer: |
| Alt+PgUp, Alt+PgDn |
Alt+Tab (switch programs) |
| Alt+End |
Ctrl+Alt+Del (task monitor) |
| Alt+Home |
(Displays the Start menu) |
| Ctrl+Alt+Break |
Alt+Enter (toggle full screen) |
| Ctrl+Alt+Plus |
Alt+PrntScrn (screen to clipboard) |
When you've finished using the remote computer, choose Start, Log Off to sign off and end the connection. If you want the remote computer to continue running an application, though, you can simply close the Remote Desktop window or select Disconnect. Your account will stay active on the remote computer until you reconnect and log off, or until a user at that computer logs on. I use this feature extensively: My spam filter is very slow, so I find it better to leave my account logged in all the time, and leave the email program open all the time. When I leave work I use Windows+L to switch off but stay logged on. Then, from home I can reconnect with remote Desktop to check email.
Note
Windows XP Professional only permits one person to use each computer. If you attempt to connect to a computer while another user is logged on, you'll have the choice of disconnecting or forcing them off. If Fast User Switch is enabled, they'll simply be switched out. Otherwise they're summarily logged off. This is somewhat brutal as the other user might lose work in progress.
If you log on using the same username as the local user, though, you simply take over the existing desktop without forcing a logoff, with any applications that were running still active.
If someone logs on to the remote computer while you're connected from afar, you'll be disconnected. Again, if Fast User Switch is enabled, you can reconnect later and pick up where you left off. Otherwise, the same deal applies: If they used a different username, your applications will be shut down.
Finally, you may notice that the TEMP environment variable is not what you expect when you log on using Remote Desktop. When a second or subsequent session is created with the Welcome Screen, or if you create a new logon session through Remote Desktopas opposed to connecting to one initially started at the computer itselfthe Terminal Services system will create a subfolder under your usual temporary folder named 1 or 2 or another digit, and TEMP will point to this subfolder. If you disconnect without logging out and later reconnect to the session at the computer console itself, TEMP will still refer to this subfolder. |