Skip to content

Commit 68b06a4

Browse files
committed
updates
1 parent 0f3b50f commit 68b06a4

File tree

1 file changed

+40
-40
lines changed

1 file changed

+40
-40
lines changed

articles/devtest-labs/configure-lab-remote-desktop-gateway.md

Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -11,35 +11,35 @@ ms.custom: UpdateFrequency2
1111

1212
# Configure and use a remote desktop gateway in Azure DevTest Labs
1313

14-
This article describes how to set up and use a gateway for secure [remote desktop](/windows-server/remote/remote-desktop-services/Welcome-to-rds) access to lab virtual machines (VMs) in Azure DevTest Labs. Using a gateway improves security because you don't expose the VMs' remote desktop protocol (RDP) ports to the internet. This remote desktop gateway solution also supports token authentication.
14+
This article describes how to set up and use a gateway for secure [remote desktop](/windows-server/remote/remote-desktop-services/Welcome-to-rds) access to lab virtual machines (VMs) in Azure DevTest Labs. Using a gateway improves security because you don't expose the VMs' Remote Desktop Protocol (RDP) ports to the internet. This remote desktop gateway solution also supports token authentication.
1515

1616
DevTest Labs provides a central place for lab users to view and connect to their VMs. Selecting **Connect** > **RDP** on a lab VM's **Overview** page creates a machine-specific RDP file, and users can open the file to connect to the VM.
1717

18-
With a remote desktop gateway, lab users connect to their VMs through a gateway machine. Users authenticate directly to the gateway machine, and can use company-supplied credentials on domain-joined machines. Token authentication provides an extra layer of security.
18+
With a remote desktop gateway, lab users connect to their VMs through a gateway machine. Users authenticate directly to the gateway machine and can use company-supplied credentials on domain-joined machines. Token authentication provides an extra layer of security.
1919

2020
Another way to securely access lab VMs without exposing ports or IP addresses is through a browser with Azure Bastion. For more information, see [Enable browser connection to DevTest Labs VMs with Azure Bastion](enable-browser-connection-lab-virtual-machines.md).
2121

2222
## Architecture
2323

2424
The following diagram shows how a remote desktop gateway applies token authentication and connects to DevTest Labs VMs.
2525

26-
![Diagram that shows the remote desktop gateway architecture.](./media/configure-lab-remote-desktop-gateway/architecture.png)
26+
:::image type="content" source="./media/configure-lab-remote-desktop-gateway/architecture.png" alt-text="Diagram that shows the remote desktop gateway architecture." lightbox="./media/configure-lab-remote-desktop-gateway/architecture.png":::
2727

2828
1. Selecting **Connect** > **RDP** from a lab VM invokes the [getRdpFileContents](/rest/api/dtl/virtualmachines/getrdpfilecontents) REST command:
2929

3030
```http
3131
POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{name}/getRdpFileContents
3232
```
3333

34-
1. When the lab has a gateway configured, the `getRdpFileContents` action invokes `https://{gateway-hostname}/api/host/{lab-machine-name}/port/{port-number}` to request an authentication token.
34+
1. When the lab is configured with a gateway, the `getRdpFileContents` action invokes `https://{gateway-hostname}/api/host/{lab-machine-name}/port/{port-number}` to request an authentication token.
3535
- `{gateway-hostname}`, or `{lb-uri}` for a load balancer, is the gateway hostname specified on the **Lab settings** page for the lab.
3636
- `{lab-machine-name}` is the name of the VM to connect to.
37-
- `{port-number}` is the port to use for the connection. Usually this port is 3389, but if the lab VM uses a [shared IP](devtest-lab-shared-ip.md), the port number is different.
37+
- `{port-number}` is the port to use for the connection. Usually this port is 3389, but if the lab VM uses a [shared IP address](devtest-lab-shared-ip.md), the port number is different.
3838

3939
1. The remote desktop gateway uses `https://{function-app-uri}/api/host/{lab-machine-name}/port/{port-number}` to defer the call to an Azure Functions function app.
4040

4141
> [!NOTE]
42-
> The request header automatically includes the function key, which it gets from the lab's key vault. The function key secret's name is the **Gateway token secret** on the lab's **Lab settings** page.
42+
> The request header automatically includes the function key, which it gets from the lab's key vault. The function key secret's name is the **Gateway token secret** that's specified on the lab's **Lab settings** page.
4343
4444
1. The Azure function generates and returns a token for certificate-based authentication on the gateway machine.
4545

@@ -55,13 +55,13 @@ When an RDP connection program opens the RDP file, the remote desktop gateway au
5555
5656
## Configuration requirements
5757

58-
There are some configuration requirements for gateway machines, Azure Functions, and networks to work with DevTest Labs RDP access and token authentication:
58+
There are some configuration requirements for enabling gateway machines, Azure Functions, and networks to work with DevTest Labs RDP access and token authentication:
5959

6060
### Gateway machine requirements
6161

6262
The gateway machine must have the following configuration:
6363

64-
- A TLS/SSL certificate to handle HTTPS traffic. The certificate must match the fully qualified domain name (FQDN) of the gateway machine if there's only one machine, or the load balancer of a gateway farm. Wild-card TLS/SSL certificates don't work.
64+
- A TLS/SSL certificate to handle HTTPS traffic. The certificate must match the fully qualified domain name (FQDN) of the gateway machine if there's only one machine, or the load balancer of a gateway farm. Wildcard TLS/SSL certificates don't work.
6565

6666
- A signing certificate. You can create a signing certificate by using the [Create-SigningCertificate.ps1](https://github.com/Azure/azure-devtestlab/blob/master/samples/DevTestLabs/GatewaySample/tools/Create-SigningCertificate.ps1) PowerShell script.
6767

@@ -90,15 +90,15 @@ For a sample function, see [CreateToken.cs](https://github.com/Azure/azure-devte
9090
The [Azure DevTest Labs GitHub repository](https://github.com/Azure/azure-devtestlab) has Azure Resource Manager (ARM) templates that help set up DevTest Labs token authentication and remote desktop gateway resources. There are templates for gateway machine creation, lab settings, and a function app.
9191

9292
> [!NOTE]
93-
> By using the sample templates, you agree to the [Remote Desktop Gateway license terms](https://www.microsoft.com/licensing/product-licensing/products).
93+
> Use of the sample templates indicates your agreement with the [Remote Desktop Gateway license terms](https://www.microsoft.com/licensing/product-licensing/products).
9494
9595
Follow these steps to set up a sample remote desktop gateway farm.
9696

9797
1. Create a signing certificate.
9898

99-
Run [Create-SigningCertificate.ps1](https://github.com/Azure/azure-devtestlab/blob/master/samples/DevTestLabs/GatewaySample/tools/Create-SigningCertificate.ps1). Record the thumbprint, password, and Base64 encoding of the created certificate to use later.
99+
Run [Create-SigningCertificate.ps1](https://github.com/Azure/azure-devtestlab/blob/master/samples/DevTestLabs/GatewaySample/tools/Create-SigningCertificate.ps1). Record the thumbprint, password, and Base64 encoding of the new certificate to use later.
100100

101-
1. Get a TLS/SSL certificate. The FQDN associated with the TLS/SSL certificate must be for a domain you control.
101+
1. Get a TLS/SSL certificate. The FQDN associated with the TLS/SSL certificate must be for a domain that you control.
102102

103103
1. Record the password, thumbprint, and Base64 encoding for the TLS/SSL certificate to use later.
104104

@@ -118,24 +118,24 @@ Follow these steps to set up a sample remote desktop gateway farm.
118118
119119
1. Download all the files from [https://github.com/Azure/azure-devtestlab/tree/master/samples/DevTestLabs/GatewaySample/arm/gateway](https://github.com/Azure/azure-devtestlab/tree/master/samples/DevTestLabs/GatewaySample/arm/gateway). Copy all the files and *RDGatewayFedAuth.msi* to a blob container in a storage account.
120120
121-
1. Open *azuredeploy.json* from [https://github.com/Azure/azure-devtestlab/tree/master/samples/DevTestLabs/GatewaySample/arm/gateway](https://github.com/Azure/azure-devtestlab/tree/master/samples/DevTestLabs/GatewaySample/arm/gateway), and fill out the following parameters:
121+
1. Open *azuredeploy.json* from [https://github.com/Azure/azure-devtestlab/tree/master/samples/DevTestLabs/GatewaySample/arm/gateway](https://github.com/Azure/azure-devtestlab/tree/master/samples/DevTestLabs/GatewaySample/arm/gateway), and fill in the following parameters:
122122
123123
124-
|Parameter |Required |Description |
124+
|Parameter |Required? |Description |
125125
|---------|---------|---------|
126-
|`adminUsername` |**Required** |Administrator user name for the gateway machines. |
127-
|`adminPassword` |**Required** |Password for the administrator account for the gateway machines. |
126+
|`adminUsername` |Required |Administrator user name for the gateway machines. |
127+
|`adminPassword` |Required |Password for the administrator account for the gateway machines. |
128128
|`instanceCount` | |Number of gateway machines to create. |
129-
|`alwaysOn` | |Whether to keep the created Azure Functions app warmed (on) or not. Keeping the app on avoids delays when users first try to connect to their lab VMs, but has cost implications. |
130-
|`tokenLifetime` | |The length of time in HH:MM:SS format that the created token is valid. |
131-
|`sslCertificate` |**Required** |The Base64 encoding of the TLS/SSL certificate for the gateway machine. |
132-
|`sslCertificatePassword` |**Required** |The password of the TLS/SSL certificate for the gateway machine. |
133-
|`sslCertificateThumbprint` |**Required** |The certificate thumbprint for identification in the local certificate store of the signing certificate. |
134-
|`signCertificate` |**Required** |The Base64 encoding for the signing certificate for the gateway machine. |
135-
|`signCertificatePassword` |**Required** |The password for the signing certificate for the gateway machine. |
136-
|`signCertificateThumbprint` |**Required** |The certificate thumbprint for identification in the local certificate store of the signing certificate. |
137-
|`_artifactsLocation` |**Required** |The URI location to find artifacts this template requires. This value must be a fully qualified URI, not a relative path. The artifacts include other templates, PowerShell scripts, and the Remote Desktop Gateway Pluggable Authentication module, expected to be named *RDGatewayFedAuth.msi* that supports token authentication. |
138-
|`_artifactsLocationSasToken`|**Required** |The shared access signature (SAS) token to access artifacts, if the `_artifactsLocation` is an Azure storage account. |
129+
|`alwaysOn` | |Whether to keep the created Azure Functions app warmed (on). Keeping the app on avoids delays when users first try to connect to their lab VMs, but it has cost implications. |
130+
|`tokenLifetime` | |The length of time, in HH:MM:SS, format that the created token is valid. |
131+
|`sslCertificate` |Required |The Base64 encoding of the TLS/SSL certificate for the gateway machine. |
132+
|`sslCertificatePassword` |Required |The password of the TLS/SSL certificate for the gateway machine. |
133+
|`sslCertificateThumbprint` |Required |The certificate thumbprint for identification in the local certificate store of the signing certificate. |
134+
|`signCertificate` |Required|The Base64 encoding for the signing certificate for the gateway machine. |
135+
|`signCertificatePassword` |Required |The password for the signing certificate for the gateway machine. |
136+
|`signCertificateThumbprint` |Required |The certificate thumbprint for identification in the local certificate store of the signing certificate. |
137+
|`_artifactsLocation` |Required |The URI location to find artifacts this template requires. This value must be a fully qualified URI, not a relative path. The artifacts include other templates, PowerShell scripts, and the Remote Desktop Gateway Pluggable Authentication module, expected to be named *RDGatewayFedAuth.msi*, that supports token authentication. |
138+
|`_artifactsLocationSasToken`|Required|The shared access signature (SAS) token to access artifacts, if the `_artifactsLocation` is an Azure storage account. |
139139
140140
1. Run the following Azure CLI command to deploy *azuredeploy.json*:
141141
@@ -157,51 +157,51 @@ Follow these steps to set up a sample remote desktop gateway farm.
157157
158158
1. Configure DNS so that the FQDN of the TLS/SSL certificate directs to the `gatewayIP` IP address.
159159
160-
After you create the remote desktop gateway farm and update DNS, configure Azure DevTest Labs to use the gateway.
160+
After you create the remote desktop gateway farm and update DNS, configure DevTest Labs to use the gateway.
161161
162162
## Configure the lab to use token authentication
163163
164-
Before you update lab settings, store the key for the authentication token function in the lab's key vault. You can get the function key value on the function's **Function Keys** page in Azure portal. To find the ID of the lab's key vault, run the following Azure CLI command:
164+
Before you update lab settings, store the key for the authentication token function in the lab's key vault. You can get the function key value on the function's **Function Keys** page in the Azure portal. To find the ID of the lab's key vault, run the following Azure CLI command:
165165
166166
```azurecli
167167
az resource show --name {lab-name} --resource-type 'Microsoft.DevTestLab/labs' --resource-group {lab-resource-group-name} --query properties.vaultName
168168
```
169169

170-
Learn how to save a secret in a key vault in the article, [Add a secret to Key Vault](/azure/key-vault/secrets/quick-create-portal#add-a-secret-to-key-vault). Record the secret name to use later. This value isn't the function key itself, but the name of the key vault secret that holds the function key.
170+
To learn how to save a secret in a key vault, see [Add a secret to Key Vault](/azure/key-vault/secrets/quick-create-portal#add-a-secret-to-key-vault). Record the secret name to use later. This value isn't the function key itself, but the name of the key vault secret that holds the function key.
171171

172-
To configure a lab's **Gateway hostname** and **Gateway token secret** to use token authentication with the gateway machine(s), follow these steps:
172+
To configure a lab's **Gateway hostname** and **Gateway token secret** to use token authentication with the gateway machine or machines, complete these steps:
173173

174-
1. On the lab's **Overview** page, select **Configuration and policies** from the left navigation.
174+
1. On the lab's **Overview** page, select **Configuration and policies** in the left pane.
175175

176-
1. On the **Configuration and policies** page, select **Lab settings** from the **Settings** section of the left navigation.
176+
1. On the **Configuration and policies** page, select **Lab settings** from the **Settings** section in the left pane.
177177

178178
1. In the **Remote desktop** section:
179179

180-
- For the **Gateway hostname** field, enter the FQDN or IP address of the remote desktop services gateway machine or farm. This value must match the FQDN of the TLS/SSL certificate used on gateway machines.
180+
- In the **Gateway hostname** box, enter the FQDN or IP address of the remote desktop services gateway machine or farm. This value must match the FQDN of the TLS/SSL certificate used on gateway machines.
181181

182-
- For **Gateway token**, enter the secret name you recorded earlier. This value isn't the function key itself, but the name of the key vault secret that holds the function key.
182+
- In **Gateway token secret**, enter the secret name you recorded earlier. This value isn't the function key itself, but the name of the key vault secret that holds the function key.
183183

184-
![Screenshot of Remote desktop options in Lab settings.](./media/configure-lab-remote-desktop-gateway/remote-desktop-options-in-lab-settings.png)
184+
:::image type="content" source="./media/configure-lab-remote-desktop-gateway/remote-desktop-options-in-lab-settings.png" alt-text="Screenshot of remote desktop options in Lab settings." lightbox="./media/configure-lab-remote-desktop-gateway/remote-desktop-options-in-lab-settings.png":::
185185

186186
1. Select **Save**.
187187

188188
> [!NOTE]
189-
> By selecting **Save**, you agree to [Remote Desktop Gateway license terms](https://www.microsoft.com/licensing/product-licensing/products).
189+
> Selecting **Save** indicates that you agree to the [Remote Desktop Gateway license terms](https://www.microsoft.com/licensing/product-licensing/products).
190190
191-
Once you configure both the gateway and the lab, the RDP connection file created when the lab user selects **Connect** includes the necessary information to connect to the gateway and use token authentication.
191+
After you configure both the gateway and the lab, the RDP connection file created when the lab user selects **Connect** includes the necessary information to connect to the gateway and use token authentication.
192192

193193
### Automate lab configuration
194194

195-
- PowerShell: [Set-DevTestLabGateway.ps1](https://github.com/Azure/azure-devtestlab/blob/master/samples/DevTestLabs/GatewaySample/tools/Set-DevTestLabGateway.ps1) is a sample PowerShell script to automatically set **Gateway hostname** and **Gateway token secret** settings.
195+
- PowerShell: [Set-DevTestLabGateway.ps1](https://github.com/Azure/azure-devtestlab/blob/master/samples/DevTestLabs/GatewaySample/tools/Set-DevTestLabGateway.ps1) is a sample PowerShell script to automatically configure **Gateway hostname** and **Gateway token secret** settings.
196196

197197
- ARM: Use the [Gateway sample ARM templates](https://github.com/Azure/azure-devtestlab/tree/master/samples/DevTestLabs/GatewaySample/arm/lab) in the Azure DevTest Labs GitHub repository to create or update labs with **Gateway hostname** and **Gateway token secret** settings.
198198

199199
### Configure a network security group
200200

201-
To further secure the lab, add a network security group (NSG) to the virtual network the lab VMs use as described in [Create, change, or delete a network security group](../virtual-network/manage-network-security-group.md). For example, an NSG could allow only traffic that first goes through the gateway to reach lab VMs. The rule source is the IP address of the gateway machine or load balancer for the gateway farm.
201+
To further secure the lab, add a network security group (NSG) to the virtual network the lab VMs use, as described in [Create, change, or delete a network security group](../virtual-network/manage-network-security-group.md). For example, an NSG could allow only traffic that first goes through the gateway to reach lab VMs. The rule source is the IP address of the gateway machine or load balancer for the gateway farm.
202202

203-
![Screenshot of a Network security group rule.](./media/configure-lab-remote-desktop-gateway/network-security-group-rules.png)
203+
:::image type="content" source="./media/configure-lab-remote-desktop-gateway/network-security-group-rules.png" alt-text="Screenshot of a network security group rule." lightbox="./media/configure-lab-remote-desktop-gateway/network-security-group-rules.png":::
204204

205-
## Next steps
205+
## Related content
206206

207207
- [Deploy your remote desktop environment](/windows-server/remote/remote-desktop-services/rds-deploy-infrastructure)

0 commit comments

Comments
 (0)