You are attempting to connect from your Windows system to another Windows system using Microsoft Remote Desktop and cannot successfully connect.
This guide explains how to set up the source and target computers, as well as the routers and firewalls in between so that you can successfully connect.
When you attempt to connect to your RDC enabled PC you receive an error message and cannot continue.
Usually RDC will fail to connect for a handful of common reasons such as:
- your router has not been set up to forward the correct port to your PC
- you have not enabled RDC on the target PC
- you have the IP Address/port incorrect
- a client firewall is blocking RDC
I will explain in three steps below how to successfully set up Remote Desktop.
This guide assumes the following:
- you have a working internet connection at both PC’s
- you have physical access to both PC’s initially
- you are using Windows XP – other versions of Windows will be very similar but not identical.
- you have administrator access (most home PC’s have this by default.)
- you type a password to access Windows. If you do not, then set one through the Users icon in Control Panel.
Step 1 – Configure the target PC
Enabling RDC and configuring the port
- Right Click on My Computer and the click Properties
- Click the Remote tab and then place a check mark in the ‘Allow users to connect remotely to this computer‘ check box. Click OK.
- Click Start > Run > type Regedit > Click OK
- Click Edit > Find > type RDP–TCP > click Find
- When Regedit finds the key on the left, look in the right pane and locate the key PortNumber
- Double click PortNumber > click the Decimal radio button > enter a 4 digit port of your choice and click OK
Changing the port number adds an extra layer of security. It’s not actually necessary for RDC to work.
- Close Regedit and reboot your computer. This is important.
Configure the target PC to have a Fixed IP Address
- After the reboot, log in to Windows and open Control Panel
- Double click Network Connections
- Locate your current network connection such as Local Area Network or Wireless Network Connection, right click it and then click Properties
- In the list of services and protocols locate Internet Protocol (TCP/IP) – highlight it and click Properties
- Ensure Use the following IP Address is selected and valid IP details are entered and click OK
If you are on a home network, set the values identical to what you have obtained automatically. You can find these values out by opening a command prompt and typing ipconfig. If you are on a network in your workplace, you may need to talk to your network administrator. Whatever you do, it’s always a good idea to take a note of your original settings just in case you need to go back.
- Take a note of your IP Address. You’ll need this later.
Open the port on your client firewall software
There are many, many different client firewalls and I can’t possibly write about them all so I will just describe the built in Windows Firewall here. If you use a third party firewall such as Symantec, McAfee, Kaspersky, etc then you should refer to the documentation that came with the software regarding opening a port.
- Open Control Panel > Windows Firewall
- Click the Exceptions tab
- Click Add Port
- Enter the name as RDC and the Port as the port number you entered in the Registry earlier (Step 1, 6)
- Click OK and OK again.
That’s Step 1 complete! Continue below to Step 2.
Step 2 – Configure the router at the target PC network
- Access your router’s configuration page. This is usually achieved by typing the gateway IP Address into your browser address bar. You can find the gateway address by clicking Start > Run > type cmd > click OK > type ipconfig > press Enter > your gateway address is listed as Default Gateway
- If your router prompts for a username and password then you’ll find it in your routers documentation. It’s usually something very obvious. Try googling the name of your router and administrator password and you’ll find it easy enough.
- On your router;s configuration you’re looking for a NAT configuration page. This is also sometimes called Port Forwarding or could be called simply Firewall.
- When you locate this page you need to configure the port forwarding on the router to:
- Local & Remote ports should be set as the port number you chose in Step 1.1.6 above
- The IP Address should be set to the IP you set in Step 1.2.5 above
- If you have the option, you should also set TCP as the preferred protocol
- If you have the option, you should set the same port number for local and remote ports
- Save your changes and restart your router
- Now we need the external IP address of your router. You can obtain this by viewing the router’s information page and looking for a WAN IP Address. Take a note of this. If you can’t find it simply point your web browser to https://www.whatismyip.com/ and take a note of the IP.
Step 3 – Configure the source PC and connect
Now that you have configured everything on the PC and router you want to connect to go to the PC that you want to connect from and do the following:
- Click Start > All Programs > Accessories > Communications > Remote Desktop Connection
- Enter the external IP Address you noted in step 6 above and then a colon (:) followed by the port number you chose. So it should read something similar to the example below but with your external IP Address and your port number.
- In the example above my external IP is 188.8.131.52 and my chosen port number is 9878
- Click Connect and enter your Windows username and password for the target PC.
That’s it! You should be connected remotely to your PC.