Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
by-Step Guide
Microsoft Corporation
Published: June 2009
Abstract
Remote Desktop Gateway (RD Gateway), formerly Terminal Services Gateway (TS Gateway), in
the Windows Server® 2008 R2 operating system, provides technologies that enable authorized
remote users to connect to resources on an internal corporate or private network, from any
Internet-connected device that can run the Remote Desktop Connection (RDC) client. In this
guide, we will set up an RD Gateway server to use for connecting to a Remote Desktop Session
Host (RD Session Host) server by using a Remote Desktop client computer.
Copyright Information
This document supports a preliminary release of a software product that may be changed
substantially prior to final commercial release, and is the confidential and proprietary information
of Microsoft Corporation. It is disclosed pursuant to a non-disclosure agreement between the
recipient and Microsoft. This document is provided for informational purposes only and Microsoft
makes no warranties, either express or implied, in this document. Information in this document,
including URL and other Internet Web site references, is subject to change without notice. The
entire risk of the use or the results from the use of this document remains with the user. Unless
otherwise noted, the companies, organizations, products, domain names, e-mail addresses,
logos, people, places, and events depicted in examples herein are fictitious. No association with
any real company, organization, product, domain name, e-mail address, logo, person, place, or
event is intended or should be inferred. Complying with all applicable copyright laws is the
responsibility of the user. Without limiting the rights under copyright, no part of this document
may be reproduced, stored in or introduced into a retrieval system, or transmitted in any form or
by any means (electronic, mechanical, photocopying, recording, or otherwise), or for any
purpose, without the express written permission of Microsoft Corporation.
Microsoft may have patents, patent applications, trademarks, copyrights, or other intellectual
property rights covering subject matter in this document. Except as expressly provided in any
written license agreement from Microsoft, the furnishing of this document does not give you any
license to these patents, trademarks, copyrights, or other intellectual property.
Microsoft, and Active Directory, RemoteApp, Windows, and Windows Server are trademarks of
the Microsoft group of companies.
Copyright Information......................................................................................................................2
Contents..........................................................................................................................................3
4
Important
If you have previously configured the computers in the Installing Remote Desktop
Session Host Step-by-Step Guide, you should repeat the steps in that guide with new
installations.
• Complete technical reference for Remote Desktop Services.
Technology review
RD Gateway uses the Remote Desktop Protocol (RDP) over HTTPS to help establish a secure,
encrypted connection between remote users on the Internet and the internal network resources
on which their productivity applications run.
To function correctly, RD Gateway requires several role services and features to be installed and
running. When you use Server Manager to install the RD Gateway role service, the following
additional roles, role services, and features are automatically installed and started, if they are not
already installed:
• Remote procedure call (RPC) over HTTP Proxy
• Web Server (IIS) [Internet Information Services]
IIS must be installed and running for the RPC over HTTP Proxy feature to function.
• Network Policy and Access Services
5
The computers form a private network and are connected through a common hub or Layer 2
switch. This step-by-step exercise uses private addresses throughout the test lab configuration.
The private network ID 10.0.0.0/24 is used for the network. The domain controller is named
CONTOSO-DC for the domain named contoso.com. The following figure shows the configuration
of the test environment.
Important
Before you configure your computers with static Internet Protocol (IP) addresses, we
recommend that you first complete Windows product activation while each of your
computers still has Internet connectivity. You should also install any available critical
security updates from Windows Update (http://go.microsoft.com/fwlink/?LinkID=47370).
Subnet mask:
255.255.255.0
6
Computer name Operating system IP settings DNS settings
requirement
Default gateway:
10.0.0.1
7
Next, configure TCP/IP properties so that RDG-SRV has an IPv4 static IP address of 10.0.0.11.
8
Step 2: Installing RD Gateway
To install and configure an RD Gateway server, you must add the RD Gateway role service.
Windows Server 2008 R2 includes the option to install the RD Gateway role service by using
Server Manager. This topic covers the installation and configuration of the RD Gateway role
service on the RDG-SRV computer in the CONTOSO domain.
Membership in the local Administrators group, or equivalent, on the RD Gateway server that
you plan to configure, is the minimum required to complete this procedure. Review details about
using the appropriate accounts and group memberships at http://go.microsoft.com/fwlink/?
LinkId=83477.
9
13. On the Select Role Services page, verify that Network Policy Server is selected,
and then click Next.
14. On the Web Server (IIS) page (which appears if this role service is not already
installed), review the summary information, and then click Next.
15. On the Select Role Services page, accept the default selections for Web Server
(IIS), and then click Next.
16. On the Confirm Installation Selections page, verify that the following role services
will be installed:
• Remote Desktop Services\RD Gateway
• Network Policy and Access Services\Network Policy Server
• Web Server (IIS)
• RPC over HTTP Proxy
17. Click Install.
18. On the Installation Progress page, installation progress will be noted.
19. On the Installation Results page, confirm that installation for these roles, role
services, and features was successful, and then click Close.
To export the SSL certificate for the RD Gateway server and copy it to the CONTOSO-
CLNT computer
1. On the RD Gateway server, open the Certificates snap-in console. If you have not
already added the Certificates snap-in console, you can do so by doing the following:
a. Click Start, click Run, type mmc and then click OK.
b. On the File menu, click Add/Remove Snap-in.
c. In the Add or Remove Snap-ins dialog box, in the Available snap-ins list, click
Certificates, and then click Add.
d. In the Certificates snap-in dialog box, click Computer account, and then click
Next.
e. In the Select Computer dialog box, click Local computer: (the computer this
console is running on), and then click Finish.
f. In the Add or Remove snap-ins dialog box, click OK.
2. In the Certificates snap-in console, in the console tree, expand Certificates (Local
Computer), expand Personal, and then click Certificates.
3. Right-click the certificate RDG-SRV.contoso.com, point to All Tasks, and then click
Export.
4. On the Welcome to the Certificate Export Wizard page, click Next.
5. On the Export Private Key page, click Yes, export the private key, and then click
Next.
6. On the Export File Format page, ensure that Personal Information Exchange -
PKCS #12 (.PFX) is selected, select the Include all certificates in the certification
10
path if possible check box, and then click Next.
7. On the Password page, enter 123 for the password to protect the private key for the
certificate, enter 123 to confirm the password, and then click Next.
8. On the File to Export page, in the File name box, click Browse.
9. In the Save As dialog box, in the File name box, enter RDG-SRV, and then click
Save.
10. On the File to Export page, click Next.
11. On the Completing the Certificate Export Wizard page, confirm that the correct
certificate is specified, that Export Keys is set to Yes, and that Include all certificates
in the certification path is set to Yes, and then click Finish.
12. After the certificate export has successfully completed, a message appears
confirming that the export was successful. Click OK.
13. Close the Certificates snap-in.
14. Copy the RD Gateway server certificate
c:\users\administrator.CONTOSO\Documents\RDG-SRV.pfx, to the CONTOSO-CLNT
computer.
To install the SSL certificate for the RD Gateway server on the CONTOSO-CLNT
computer
1. Log on to CONTOSO-CLNT as CONTOSO\Administrator.
2. Open the Certificates snap-in console by doing the following:
a. Click Start, click Run, type mmc and then click OK.
b. On the File menu, click Add/Remove Snap-in.
c. In the Add or Remove Snap-ins dialog box, in the Available snap-ins list, click
Certificates, and then click Add.
d. In the Certificates snap-in dialog box, click Computer account, and then click
Next.
e. In the Select Computer dialog box, click Local computer: (the computer this
console is running on), and then click Finish.
11
f. In the Add or Remove snap-ins dialog box, click OK.
3. In the Certificates snap-in console, in the console tree, expand Certificates (Local
Computer), and then click Personal.
4. Right-click the Personal folder, point to All Tasks, and then click Import.
5. On the Welcome to the Certificate Import Wizard page, click Next.
6. On the File to Import page, in the File name box, click Browse, and then browse to
the location where you copied the SSL certificate for the RD Gateway server. From the
file type drop-down list, select All Files (*.*). Select the certificate RDG-SRV.pfx, click
Open, and then click Next.
7. On the Password page, in the Password box, enter 123, verify that the Include all
extended properties check box is selected, and then click Next.
8. On the Certificate Store page, accept the default option (Place all certificates in
the following store - Trusted Root Certification Authorities), and then click Next.
9. On the Completing the Certificate Import Wizard page, confirm that the correct
certificate has been selected and that the following certificate settings appear:
• Certificate Store Selected by User: Trusted Root Certification Authorities
• Content: PFX
• File Name: FilePath\RDG-SRV.pfx.
10. Click Finish.
11. After the certificate import has successfully completed, a message appears
confirming that the import was successful. Click OK.
12. With Certificates selected in the console tree, in the details pane, verify that the
correct certificate appears in the list of certificates on the CONTOSO-CLNT computer.
The certificate must be under the Personal store of the local computer.
13. Log off from the CONTOSO-CLNT computer.
12
7. In the Windows Security dialog box, type the password for contoso\mskinner, and
then click OK.
8. If the connection is successful, a Windows desktop will appear on the screen for
RDSH-SRV.
You have successfully deployed and demonstrated the functionality of RD Gateway on Remote
Desktop Services by using the simple scenario of connecting to an RD Session Host server by
using RD Gateway with an authorized remote user account by using Remote Desktop
Connection. You can also use this deployment to explore some of the additional capabilities of
Remote Desktop Services through additional configuration and testing.
13