My lab is very XenApp and XenDesktop focused, but I need to expand the functionality to include secure access with NetScaler Gateway and incorporate mobile device management/mobile app management (MDM/MAM) with XenMobile.
From what I understand, in order to do this, I really need to install certificates. D’oh!
Every time I have to deal with certificates I know I will run into issues. I’m not spending money on certificates for my lab. I want to use Microsoft Certification Authority. Unfortunately, most documentation I read simply states “Get a certificate from your public authority”. That is not very helpful.
And I suspect many XenApp and XenDesktop admins have similar challenges, so I decided to document the process (minus all of the mistakes).
This will be a multi-part blog focusing on the following topics:
- Certificates
- Integrate XenMobile with XenApp and XenDesktop
- Integrate NetScaler with XenMobile, XenApp and XenDesktop
My Environment
First, some details about my starting environment (in case you are using this to guide your buildout).
-
I have a XenDesktop and StoreFront environment built and operational for local user access
- NetScaler Gateway is NOT currently used
- All connections are using HTTP
- NetScaler Gateway is NOT currently used
-
XenMobile Server
- VM installed
- First time use wizard (CLI) completed
- First time use wizard (GUI) completed, without configuring any optional settings. I did not configure certificates, LDAP, or NetScaler configs.
- VM installed
-
NetScaler
- VM installed
- First time use wizard (CLI) completed
- First time use wizard (GUI) completed, including licenses
- VM installed
My environment specifics are as follows:
Server Name | Roles | Version | IP Addresses |
DDC01.snpp.local | XenDesktop Controller | 7.14 | 172.16.0.117 |
SF01.snpp.local | StoreFront Server | 3.8 | 172.16.0.119 |
XM01.snpp.local | XenMobile Server | 10.4 | 172.16.0.13 |
NG01.snpp.local | NetScaler Gateway | 12 | MIP: 172.16.0.14
SNIP: 172.16.0.15 Gateway: 172.16.0.16 |
DC1.snpp.local | Domain Controller
Certification Authority DNS DHCP |
2016 | 172.16.0.10 |
My DNS:
Add the following addresses to DNS based on the defined IP addresses
- XM01.snpp.local
- Gateway.snpp.local
-
StoreFront.snpp.local is an alias for SF01.snpp.local. StoreFront.snpp.local is the base URL for the StoreFront store
My Certificates:
Certificates are often the most confusing part of the configuration, especially when you are trying to use your own Certificate Authority (CA), like I am with Microsoft Certification Authority in Windows Server 2016. In order to successfully create a deployment, we need the following certificates
- Wildcard certificate (*.SNPP.local)
- Root certificate for my CA
Note: You can opt to use FQDN server certs instead of the wildcard, but you will need one for each server. The process is the same.
Create Certificate
1. Launch Internet Information Services (IIS) Manager from the StoreFront Server
2. Within IIS Manager, select the server in the left pane. Then double-click Server Certificates in the middle pane.
3. Select Create Domain Certificate from the right pane
4. Fill in the appropriate information with the common name being the wildcard cert name. In my example *.snpp.local
5. Hit Select to select the CA. Enter in a friendly name. Select Finish
6. The wildcard certificate should now appear in the window
Export Certificates
The certificate is installed on the local StoreFront server. We need to export the certificate and private key so we can install it on our other servers.
1 Launch MMC
2. Select File – Add/Remove Snapin
3. Double-click Certificates
4. Select Computer Account
5. Finish the add/remove dialogs
6. Navigate to Personal – Certificates. The wildcard certificate should be visible. Right-click the cert and select Export
7. Do NOT export the private key
8. Select Base-64 encoded X.509
9. Give the certificate file a name like WildcardCert.cer and save
We need to export the certificate AGAIN
- Right-click the wildcard cert and select Export
- This time, include the private key
-
Select the following
a. Personal Information Exchange PKCS #12
b. Include all certificates in the certification path if possible
c. Export all extended properties
4. Add a password to the key file
5. Save the file with a name like WildcardCertKey
We need one more certificate, the Root Certificate so all of our devices will trust the certificates from our private CA.
- Open a browser and navigate to http://172.16.0.10/certsrv (This is the IP of the domain controller running certification authority)
2. Select Download a CA Certificate, certificate chain, or CRL
3. Select Base 64.
4. Select Download CA Certificate. Give it a name like SNPPRootCA
Install Certificates
We need to install the certs on the StoreFront server, delivery controller, XenMobile server and NetScaler. Because we created a domain certificate request on the StoreFront server, the certificate is already installed. But if you have multiple StoreFront servers, this must be done on the remaining ones.
Install Certificates on StoreFront and Delivery Controller Servers
- On the storefront server, double-click on the SNPPRootCA.cer file.
- Select Install Certificate
3. Select Local Machine
4. Select Place all certificates in the following store, and select Trusted Root Certification Authorities
5. The Root CA is now installed on the host.
To install the wildcard certificate,
- Double-click the certificate containing the private key: WildcardCertKey.pfx
- Select Local Machine
3. The file name should be filled in automatically
4. Enter in the certificate’s password
5. Place all certificates in the following store: Personal
Repeat on all remaining Windows-based delivery controllers and StoreFront servers
Install Certificates on XenMobile Server
Install the root certificate
- From your browser, navigate to https://172.16.0.13:4443. This is the IP Address of the XenMobile Server
- Select the Gear icon in the upper right to go into the configuration menu
- Select Certificates
- Select Import
-
Make the following selections
a. Import: Certificate
b. Use as: Server
c. Certificate Import: SNPPRootCA.cer
5. Select Import
6. The Root CA should not be installed
Install the wildcard certificate
- Select Import
-
Make the following selections
a. Import: keystore
b. Keystore Type: PKCS#12
c. Use as: SSL Listener
d. Keystore file: WildcardCertKey.pfx
e. Password: this is the password used when exporting the wildcard certificate’s private key
3. Select Import
4. Select OK in the import message warning
5. Reboot the XenMobile server for the certificate to take effect
To test the certificate, launch a browser to https://xm01.snpp.local:4443. If the certificate works, there should be no untrusted certificate warning message. Make sure your endpoint has the following the root certificate installed in the local machine store.
If using Firefox (browser I used), you have to add the Root CA cert directly into the browser.
1. In Firefox, select Options
2. Select Advanced
3. Select Certificates
4. Select View Certificates
5. Under Authorities, select Import.
6. Select the SNPPRootCA.cer file
Install Certificates on NetScaler
First, we need to create a PEM file from the PKCS#12 file (certificate export with private key)
- Launch a browser to http://172.16.0.14 and log in.
- Navigate to Traffic Management – SSL
3. Select Import PKCS#12. Use the following information
a. Output File Name: wildcard-snpp-local.key
b. Choose File: WildcardCertKey.pfx (This is the local certificate file we exported with the private key)
c. Input Password: enter in the password used for the export
d. Encoding Format: 3DES
f. PEM Passphrase: Enter in a password
Now, we need to upload our certificate
- In the Traffic Management – SSL section, select Manage Certificates / Keys / CSRs
2. Select Upload
3. Select WildcardCert.cer
4. Select Upload
5. Select SNPPRootCA.cer
6. Select WildcardCertKey.pfx
7. Select Delete. We don’t need that file anymore as it was used to create our keyfile
We install our server certificate
- Navigate to Traffic Management – SSL – Certificates – Server Certificates
- Select Install
-
Enter in the following
a. Certificate-Key Pair Name: Wildcard-SNPP-Local
b.Certificate File Name: WildcardCert.cer
c. Key File Name: wildcard-snpp-local.key
d. Password: the PEM passphrase used earlier
Finally, we install our root certificate
- Navigate to Traffic Management – SSL – Certificates – CA Certificates
- Select Install
-
Enter in the following
a. Certificate-Key Pair Name: SNPPRootCert
b. Certificate File Name: SNPPRootCA.cer
We are done with Certificates!!!!!!!!!
Daniel (Follow on Twitter @djfeller)
Citrix XenApp and XenDesktop 7.6 VDI Handbook
XenApp Best Practices
XenApp Video