Guaranteed RDP

I am asked to help my loved ones fix their computer problems.  And, considering that they do not necessarily know what they are doing when using a computer, sometimes problems arise.  Since I live in the city away from my family, I have configured a RDP connection from my location to my family’s computer network.  That way, if the problem is software based, I can remote into their computer and see what is happening.  Since there are multiple devices on the network, I have configured through port forwarding how to remote into each one.

remote desktop connection

The IP addresses assigned to your router changes from time to time from your ISP.  Through Dynamic DNS (DDNS) you can connect through the configured router regardless of the IP changes.  Essentially, once you successfully configure your connection the first time, there is no need to reconfigure it.  And in my case, I have the comfort in knowing that I can rely on something to help troubleshoot my family’s problems without me having to be on location.  The essence on how to ensure remote access can be broken into four major items:

  • Router Firmware
  • DDNS
  • Port Forwarding
  • Static DHCP Leases

Router Firmware

When you go into ipconfig to get a brief list of your network information, there will be a gateway IP address.  That is essentially the internal IP address to your router.  If you type that IP address into a browser in the URL bar, you will essentially see your router’s firmware.  There are three settings you need to navigate through to be able to do this:

  • DDNS
  • Port Forwarding
  • Static DHCP Leases

Port forwarding is most likely to be in every firmware.  I have seen DDNS be added to stock router firmwares recently, but there are plenty of routers that do not support this feature.  In the assumed case your router does not support this feature, you can still get this feature by downloading third party router firmwares.  An open source firmware that I recommend all the time is DD-WRT.  What you would have to do first would be to follow the instructions, and load DD-WRT or any third party firmware onto your router (this will void the warranty).  Do not worry though, third party firmwares can make your fifty dollar routers with the functionality of two-hundred dollar routers.  It really is amazing.

DDNS         

From there, you want to make an account with a DDNS website and then register a domain with that account.  That account can have multiple domains.  Then go to your DDNS tab and enter your account information from the website.  Once applied, the router will automatically upload the IP address information to that domain.  For whatever reason if your ISP decides to change your IP address, then the router will automatically update the information correlating to that domain.  So, when you go to RDP into another computer, you put in the address bar the domain that you registered on the DDNS website.  That domain will point to the working IP address on the network which you are connecting.  In other words, you will connect to the remote network regardless of IP address changes.  But if there are multiple computers on the network, how do you ensure which ones to remote to?  One strategy would be to change the port going into the network and have the various machines listen to RDP on different ports.  But there is an easier and more powerful way, and it is through the router.  It is port forwarding and static DHCP leases.

Port Forwarding 

Port forwarding basically takes traffic from a port coming outside the router, and routes it to a specific IP address to a specific port inside the network.  This is powerful.  You do not have to change the OS settings of the computers on the network you are trying to remote to.  Essentially, you change the port coming into the router, and it would be sent accordingly to the assigned computer on a certain port.  The common port for RDP is TCP 3389.  There is one last puzzle to solve in this madness.  How do we know those devices will have the same internal IP addresses considering that the router is using DHCP?  The answer lies in assigned DHCP leases using MAC address.

Static DHCP Leases

Every network device has a MAC address imprinted onto it.  In fact, if devices communicate on the internal level of a network, they route information based upon their MAC address.  IP addresses get used when connecting to different networks.  In either case, with third party firmwares, you can actually assign a MAC address to a specific IP address assuming it is in range of the DHCP lease.  You can find your mac address, by typing the ipconfig /all command.  Then, you can literally reserve a certain internal IP address for a specific computer on the network.  Therefore, the port forwarding settings don’t have to be changed at all.  They are fixed once they are configured.  With that in place, if you type the right port when connecting to your network, you will automatically reach a connection to the specific computer that you want in the network.  And the beautiful thing is, it is configured to be dynamic where it needs to be dynamic and static where it needs to be static.  This primarily means once things are configured, they are there to stay.  It should work assuming there is an internet connection on both sides of the RDP connection.

And so with this, I am at ease about leaving my computer builds in the hands that were meant for them.  Even though my family continually brings me headaches, I am at a position to have a reliable connection to them, to help figure out computer problems that will arise.