|
| 1 | +--- |
| 2 | +description: >- |
| 3 | + This article outlines the process for installing or updating a certificate to prevent Remote Desktop Protocol (RDP) certificate warnings during SbPAM workflows. |
| 4 | +keywords: |
| 5 | + - RDP |
| 6 | + - certificate installation |
| 7 | + - SbPAM |
| 8 | +sidebar_label: Configure Proxy for RDP Connections |
| 9 | +tags: [] |
| 10 | +title: "Configure Proxy for RDP Connections (Install/Update Certificate to Prevent RDP Certificate Warnings)" |
| 11 | +knowledge_article_id: kA04u0000000HRRCA2 |
| 12 | +products: |
| 13 | + - onesecure |
| 14 | +--- |
| 15 | + |
| 16 | +# Configure Proxy for RDP Connections (Install/Update Certificate to Prevent RDP Certificate Warnings) |
| 17 | + |
| 18 | +## Overview |
| 19 | + |
| 20 | +This article outlines the process for installing or updating a certificate to prevent Remote Desktop Protocol (RDP) certificate warnings during SbPAM workflows. |
| 21 | + |
| 22 | +## Prerequisites |
| 23 | + |
| 24 | +- Windows Server must have the **Certification Authority** and **Certification Authority Web Enrollment** roles installed and configured. This ensures that the **Certification Authority** utility can be successfully launched and accessed via a web browser (`https://<servername>/certsrv`). |
| 25 | + |
| 26 | + > **IMPORTANT:** The Certification Authority's post-deployment configuration must be completed after installing both prerequisite roles. |
| 27 | +
|
| 28 | +  |
| 29 | + |
| 30 | +- The domain must have the **Enrollment Policy** set to enable automatic enrollment and renewal. The **Certificate Enrollment Policy** for user and computer certificates is configured in the **Group Policy** snap-in under **Default Domain Policy** (or another group policy applied to all systems that will access an NPS server on a group-by-group basis). To configure this: |
| 31 | + |
| 32 | + 1. On the Domain Controller, open the **Group Policy** snap-in. |
| 33 | + 2. Navigate to **Computer Configuration > Policies > Windows Settings > Security Settings > Public Key Policies** and enable the **Certificate Services - Certificate Enrollment Policy**. |
| 34 | + |
| 35 | +## Instructions |
| 36 | + |
| 37 | +### Generate Certificate |
| 38 | + |
| 39 | +> **NOTE:** If you already have a certificate to install, you can skip to the **Adding the Certificate to Each SbPAM Proxy Server** section below. |
| 40 | +
|
| 41 | +1. Open **Certification Authority**, open your CA, right-click **Certificate Templates**, and click **Manage**. |
| 42 | +  |
| 43 | + |
| 44 | +2. In the **Certificate Templates Console**, right-click **Workstation Authentication**, and click **Duplicate Template**. |
| 45 | +  |
| 46 | + |
| 47 | +3. On the **General** tab, change the name to **Client-Server Authentication** and enable the **Publish certificate in Active Directory** checkbox. |
| 48 | +  |
| 49 | + |
| 50 | +4. On the **Subject Name** tab, enable the **Supply in the request** radio button. |
| 51 | +  |
| 52 | + |
| 53 | +5. On the **Extensions** tab, select **Application Policies** and click **Edit**. Click **Add**, then select **Server Authentication**. Click **OK** until you return to the **Properties of New Template** dialog. |
| 54 | +  |
| 55 | + |
| 56 | +6. On the **Security** tab, select **Domain Computers** and enable the checkbox to allow **Autoenroll**. Click **OK** and then close the Certificate Templates Console. |
| 57 | +  |
| 58 | + |
| 59 | +7. Back in **Certification Authority**, right-click **Certificate Templates**, hover over **New**, and click **Certificate Template to Issue**. |
| 60 | +  |
| 61 | + |
| 62 | +8. Select **Client-Server Authentication** and click **OK**. |
| 63 | +  |
| 64 | + |
| 65 | +9. On the desktop, create a text file named **request.inf** with the following content (replace the **red** text with your server certificate name): |
| 66 | + |
| 67 | + ```plaintext |
| 68 | + [Version] |
| 69 | + Signature="$Windows NT$" |
| 70 | + [NewRequest] |
| 71 | + Subject = "CN=**sbpam-3.sblab.local**" |
| 72 | + KeySpec = 1 |
| 73 | + KeyLength = 2048 |
| 74 | + Exportable = TRUE |
| 75 | + MachineKeySet = FALSE |
| 76 | + SMIME = False |
| 77 | + PrivateKeyArchive = FALSE |
| 78 | + UserProtected = FALSE |
| 79 | + UseExistingKeySet = FALSE |
| 80 | + ProviderName = "Microsoft RSA SChannel Cryptographic Provider" |
| 81 | + ProviderType = 12 |
| 82 | + RequestType = PKCS10 |
| 83 | + KeyUsage = 0xa0 |
| 84 | + HashAlgorithm = SHA256 |
| 85 | + [Extensions] |
| 86 | + 2.5.29.17 = "{text}" |
| 87 | + _continue_ = "dns=**sbpam-3.sblab.local**&" |
| 88 | + [EnhancedKeyUsageExtension] |
| 89 | + OID=1.3.6.1.5.5.7.3.1 |
| 90 | + ``` |
| 91 | + |
| 92 | +10. Open Command Prompt as Administrator, change directory to the Desktop (or the location of your **request.inf** file), and run: |
| 93 | + |
| 94 | + ```plaintext |
| 95 | + certreq -new request.inf rdp.csr |
| 96 | + ``` |
| 97 | +
|
| 98 | +  |
| 99 | +
|
| 100 | +11. To sign the certificate request, use your preferred signing mechanism. The following example uses Active Directory Certificate Services (`https://<servername>/certsrv`). |
| 101 | +   |
| 102 | +
|
| 103 | + Click **Request a certificate**, then click **advanced certificate request**. |
| 104 | +
|
| 105 | +12. Open the saved certificate signing request (**rdp.csr**) from the previous step in Notepad. Copy the certificate request into the **Saved Request** field. Select **Client-Server Authentication** from the **Certificate Template** dropdown. Click **Submit**. |
| 106 | +  |
| 107 | +
|
| 108 | + Leave other settings at default values, and click **Submit**. |
| 109 | +
|
| 110 | +13. Select **DER encoded** and click **Download certificate**. |
| 111 | +  |
| 112 | +
|
| 113 | +14. Open the downloaded certificate and select **Install Certificate**. Proceed with all default values and complete the wizard. |
| 114 | +  |
| 115 | +
|
| 116 | +15. To export the certificate, view certificates for the current user by launching **certmgr.msc** using the Windows **Run** menu. |
| 117 | +  |
| 118 | +
|
| 119 | + Right-click the installed certificate (the certificate using the **Client-Server Authentication** template) and click **Export...**. |
| 120 | +  |
| 121 | +
|
| 122 | +16. In the **Certificate Export Wizard**, change the **Export Private Key** option to **Yes, export the private key**. |
| 123 | +  |
| 124 | +
|
| 125 | +17. For **Export File Format**, select **Personal Information Exchange - PKCS #12 (.PFX)**. Select the following checkboxes: |
| 126 | +
|
| 127 | + - Include all certificates in the certification path if possible |
| 128 | + - Enable certificate privacy |
| 129 | +
|
| 130 | +  |
| 131 | +
|
| 132 | +18. For **Security**, enter a password of your choosing and select the AES256-SHA256 encryption option (3DES is no longer recommended by NIST). |
| 133 | +
|
| 134 | + > **IMPORTANT:** For **File to Export**, the file name **must** be **rdp.pfx**. If it is named anything else, importing the .pfx file on each proxy server will not work. |
| 135 | +  |
| 136 | +
|
| 137 | +19. This certificate can now be imported to each SbPAM Proxy Server. |
| 138 | +
|
| 139 | +### Adding the Certificate to Each SbPAM Proxy Server |
| 140 | +
|
| 141 | +1. Copy **rdp.pfx** (from the previous steps) to each SbPAM Proxy Server. |
| 142 | +
|
| 143 | +2. On each SbPAM Proxy Server, run the following command via an elevated **Command Prompt**, and enter the certificate's password when prompted. |
| 144 | +
|
| 145 | + > **IMPORTANT:** The path to **sbpam-proxy.exe** may be different depending on the install path you selected when installing SbPAM and/or distributed proxy services. |
| 146 | +
|
| 147 | + ```plaintext |
| 148 | + "C:\Program Files\Stealthbits\PAM\ProxyService\sbpam-proxy.exe" ca import -p [PATH]\rdp.pfx |
| 149 | + ``` |
| 150 | + |
| 151 | +  |
| 152 | + |
| 153 | +3. The new certificate has now been imported to an SbPAM Proxy Server. Repeat this process for all SbPAM Proxy Servers if using more than one. (The default installation of SbPAM uses one proxy service on the SbPAM server itself; however, additional proxy services can be distributed.) |
0 commit comments