How to Connect a Remote Desktop Through a Proxy Server to a Terminal Server

Updated on December 6, 2016

Introduction

This article is aimed at those who host Terminal Servers ( or Remote Desktop servers in 2008R2 terminology ) and who would like the ability for their clients or themselves to be able to connect via a Web Proxy server to their Terminal Servers from the internet. I will explain concepts and will not include detailed "how to steps" to add server roles because I will assume that the reader will be quite an experienced system administrator. Perhaps I may create other hubs that will detail step by step instructions to add the different server roles.

Security Restrictions

Normally clients can just connect directly across the internet on Port 3389 to the Terminal Servers using the Microsoft Remote Desktop Client (or other variations of Remote Desktop). However due to tighter security in many big organisations, those client workstations are usually not allowed to access the internet directly. By internet, I mean any applications (TCP and UDP ports) on the internet, and not just Web Browsing (Port 80, and/or SSL Port 443).

These organisations usually install a type of web proxy server where they will allow clients to browse the web, but the web browser software must be configured to send web requests to the web proxy server. The web proxy server connects to the web sites on behalf of the web browser and sends the pages through to the browser. In this configuration, the web browser does not talk directly to the internet to retrieve the web pages. If it was not configured to go through a web proxy server, it will not be able to reach any web sites.

This is all well and good because most browser software have an option for you to put in the web proxy server address. However, the standard Microsoft Remote Desktop Client software does not have this option.


Remote Desktop Client and the Gateway Server Settings

Remote Desktop Gateway Server

The later versions of Remote Desktop Client have an option for putting in a Remote Desktop gateway server address. Windows Server 2008 and Windows Server 2008R2 have the new Terminal Services Gateway and Remote Desktop Services Gateway server role respectively.

What this server role does is to allow the Remote Desktop Client to connect to the RD Gateway first. The RD Gateway then creates a remote desktop session on behalf of the client to the server that the client needs to connect to.

The Remote Desktop Gateway server can be placed either at the clients premises, and firewall rules can then be set up to allow this server only access to your terminal servers in your hosted environment, or the Remote Desktop Gateway server can be placed at the same network location as your terminal servers, and firewall rules on the clients network can be configured to allow client workstations access to this Gateway server only.

To implement our solution of connecting Remote Desktop via the web proxy server, we must put the gateway server in the same network as the terminal servers. However, we DO NOT need to touch the existing firewall rules at all because we want to use the web proxy server to connect us to our Remote Desktop Gateway server and connect to the terminal servers on behalf of the local Remote Desktop client.

Remote Desktop Web Access Server

The Remote Desktop Web Access Server role is the last piece of the puzzle and it will allow us to use Internet Explorer to be able to connect via the Remote Desktop Web Connection Active X program.

A server needs to be configured with the Remote Desktop Web Access Server role so that clients can access this Web server's portal over the internet using Internet Explorer via the web proxy server. This Web Access server is configured with the source that provides the RemoteApp programs.

The source of the Remote App programs is the server that has the applications you want to serve. This is the server that has the Remote Desktop Session Host server role (terminal server). Having this role means the RemoteApp Manager program is also installed automatically. You need to run the RemoteApp manager on the source server to publish the application you want users to run. You can also publish a Remote Desktop client so they can run it from the portal. In the RemoteApp Manager settings, you will also need to specifiy the Remote Desktop Gateway settings. This way, when clients try to run the program from the portal (or run Remote Desktop from the portal) it is forced to use the Remote Desktop gateway via the web proxy server. If you don't specify the Remote Desktop gateway, it will try to access the terminal servers directly from the client, meaning it tries to bypass the web proxy server.

You also need to install a certified SSL Certificate on the RD Gateway to ensure that the connection to the RD Gateway is via the secure SSL port 443.

And Finally....

Hopefully the information above have helped you or pointed you in the right direction. If you have a question, please ask via the comments section below.

Comments

    0 of 8192 characters used
    Post Comment

    • sengstar2005 profile imageAUTHOR

      sengstar2005 

      13 months ago from Sydney

      Hi Thomas,

      The scenario above is for when you are managing your own Remote Desktop Servers or Terminal servers and are trying to allow clients who are behind a proxy server to access it as their company won't open up the RDP TCP port 3389. I am not sure of your situation, and unfortunately I don't have a tutorial for accessing public cloud servers via RDP yet.

    • profile image

      Thomas 

      13 months ago

      Hi,

      Very interessting article. I am facing the same problem now. I can't access my virtuall PC in cloud with the Microsoft Remote Desktop. I wonder if you have information in form of tutorial?

      Many thanks!

    working

    This website uses cookies

    As a user in the EEA, your approval is needed on a few things. To provide a better website experience, turbofuture.com uses cookies (and other similar technologies) and may collect, process, and share personal data. Please choose which areas of our service you consent to our doing so.

    For more information on managing or withdrawing consents and how we handle data, visit our Privacy Policy at: https://turbofuture.com/privacy-policy#gdpr

    Show Details
    Necessary
    HubPages Device IDThis is used to identify particular browsers or devices when the access the service, and is used for security reasons.
    LoginThis is necessary to sign in to the HubPages Service.
    Google RecaptchaThis is used to prevent bots and spam. (Privacy Policy)
    AkismetThis is used to detect comment spam. (Privacy Policy)
    HubPages Google AnalyticsThis is used to provide data on traffic to our website, all personally identifyable data is anonymized. (Privacy Policy)
    HubPages Traffic PixelThis is used to collect data on traffic to articles and other pages on our site. Unless you are signed in to a HubPages account, all personally identifiable information is anonymized.
    Amazon Web ServicesThis is a cloud services platform that we used to host our service. (Privacy Policy)
    CloudflareThis is a cloud CDN service that we use to efficiently deliver files required for our service to operate such as javascript, cascading style sheets, images, and videos. (Privacy Policy)
    Google Hosted LibrariesJavascript software libraries such as jQuery are loaded at endpoints on the googleapis.com or gstatic.com domains, for performance and efficiency reasons. (Privacy Policy)
    Features
    Google Custom SearchThis is feature allows you to search the site. (Privacy Policy)
    Google MapsSome articles have Google Maps embedded in them. (Privacy Policy)
    Google ChartsThis is used to display charts and graphs on articles and the author center. (Privacy Policy)
    Google AdSense Host APIThis service allows you to sign up for or associate a Google AdSense account with HubPages, so that you can earn money from ads on your articles. No data is shared unless you engage with this feature. (Privacy Policy)
    Google YouTubeSome articles have YouTube videos embedded in them. (Privacy Policy)
    VimeoSome articles have Vimeo videos embedded in them. (Privacy Policy)
    PaypalThis is used for a registered author who enrolls in the HubPages Earnings program and requests to be paid via PayPal. No data is shared with Paypal unless you engage with this feature. (Privacy Policy)
    Facebook LoginYou can use this to streamline signing up for, or signing in to your Hubpages account. No data is shared with Facebook unless you engage with this feature. (Privacy Policy)
    MavenThis supports the Maven widget and search functionality. (Privacy Policy)
    Marketing
    Google AdSenseThis is an ad network. (Privacy Policy)
    Google DoubleClickGoogle provides ad serving technology and runs an ad network. (Privacy Policy)
    Index ExchangeThis is an ad network. (Privacy Policy)
    SovrnThis is an ad network. (Privacy Policy)
    Facebook AdsThis is an ad network. (Privacy Policy)
    Amazon Unified Ad MarketplaceThis is an ad network. (Privacy Policy)
    AppNexusThis is an ad network. (Privacy Policy)
    OpenxThis is an ad network. (Privacy Policy)
    Rubicon ProjectThis is an ad network. (Privacy Policy)
    TripleLiftThis is an ad network. (Privacy Policy)
    Say MediaWe partner with Say Media to deliver ad campaigns on our sites. (Privacy Policy)
    Remarketing PixelsWe may use remarketing pixels from advertising networks such as Google AdWords, Bing Ads, and Facebook in order to advertise the HubPages Service to people that have visited our sites.
    Conversion Tracking PixelsWe may use conversion tracking pixels from advertising networks such as Google AdWords, Bing Ads, and Facebook in order to identify when an advertisement has successfully resulted in the desired action, such as signing up for the HubPages Service or publishing an article on the HubPages Service.
    Statistics
    Author Google AnalyticsThis is used to provide traffic data and reports to the authors of articles on the HubPages Service. (Privacy Policy)
    ComscoreComScore is a media measurement and analytics company providing marketing data and analytics to enterprises, media and advertising agencies, and publishers. Non-consent will result in ComScore only processing obfuscated personal data. (Privacy Policy)
    Amazon Tracking PixelSome articles display amazon products as part of the Amazon Affiliate program, this pixel provides traffic statistics for those products (Privacy Policy)