Setting up SSL for Active Directory Server
Any utility or application that creates a valid PKCS #10 request can be used to form the SSL certificate request. The following example uses certreq.exe to form the request.
To set up SSL for Active Directory Server (ADS):
-
Find the Fully Qualified Domain Name (FQDN).
-
Request a server authentication certificate.
-
Verify an LDAPS connection.
To create certificate request, the Fully Qualified Domain Name (FQDN) of the Domain Controller (DC) is needed.
Finding the FQDN
To find the FQDN:
-
Select .
The dnsmgmt window opens.
-
Double-click the host name of your machine, and you will see the FQDN.
Requesting a Server Authentication Certificate
To request a server authentication certificate:
-
Copy and paste the following text into a new text file and save it as request.inf:
; ----------------- request.inf ----------------- [Version] Signature="$Windows NT$" [NewRequest] Subject = "CN = LAB-SUMAHADE-WF.adserver.coretools” ; replace with the FQDN of the DC KeySpec = 1 KeyLength = 1024 ; Can be 1024, 2048, 4096, 8192, or 16384. ; Larger key sizes are more secure, but have ; a greater impact on performance. Exportable = TRUE MachineKeySet = TRUE SMIME = False PrivateKeyArchive = FALSE UserProtected = FALSE UseExistingKeySet = FALSE ProviderName = "Microsoft RSA SChannel Cryptographic Provider" ProviderType = 12 RequestType = PKCS10 KeyUsage = 0xa0 [EnhancedKeyUsageExtension] OID=1.3.6.1.5.5.7.3.1 ; this is for Server Authentication ;----------------------------------------------- -
Provide the fully qualified DNS name of the domain controller in the request. The semicolon (;) is used to indicate that the following text through the end of the line is a comment.
-
Create the request file and then, in a command prompt, navigate to the path where the request is and type the following command:
certreq -new <Name of the inf file> <name of the request file>Example:
certreq -new request.inf request.reqA new request.req is created in the current directory. This is the base64-encoded request file.
-
Submit the request to a CA for a server certificate. Save the server certificate, servercert.cer, on your machine. The saved certificate must be base64–encoded.
-
Accept the issued certificate by opening a command prompt, navigating to the path where the server certificate is stored, and executing the following command:
certreq -accept <Name of the server certificate>Example:
certreq -accept servercert.cer -
Now the certificate is installed in your personal store. A private key is associated with this certificate. Verify this key by referring to the ADS documentation.
-
Restart the domain controller by restarting the server.
Verifying an LDAPS Connection
To verify an LDAPS connection:
-
Start the Active Directory Administration Tool (ldp.exe) by selecting
-
On the Connection menu, click Connect.
-
When prompted, enter the name of the domain controller (enter the FQDN) to which you want to connect and the SSL port number.
-
Click OK.
The RootDSE information should appear in the right pane, indicating a successful connection.