<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Gavin Adams Information Blog &#187; Citrix</title>
	<atom:link href="http://www.gavinadams.org/blog/category/tech-tips/citrix/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.gavinadams.org/blog</link>
	<description>Musings on hobbies, technology and topics of interest</description>
	<lastBuildDate>Sat, 25 Jun 2011 14:22:21 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>StartSSL (StartCom) Certificates on the Citrix NetScaler</title>
		<link>http://www.gavinadams.org/blog/2010/08/02/startssl-startcom-certificates-on-the-citrix-netscaler/</link>
		<comments>http://www.gavinadams.org/blog/2010/08/02/startssl-startcom-certificates-on-the-citrix-netscaler/#comments</comments>
		<pubDate>Mon, 02 Aug 2010 15:45:47 +0000</pubDate>
		<dc:creator>me@gavinadams.org</dc:creator>
				<category><![CDATA[Netscaler]]></category>
		<category><![CDATA[PKI / Certificates]]></category>
		<category><![CDATA[Citrix]]></category>
		<category><![CDATA[NetScaler]]></category>
		<category><![CDATA[SSL]]></category>
		<category><![CDATA[startssl.com]]></category>

		<guid isPermaLink="false">http://www.gavinadams.org/blog/?p=139</guid>
		<description><![CDATA[<p>For a very low cost, it&#8217;s easy to use StartSSL (Startcom) certificates on the Citrix NetScaler product line. This is includes the free NetScaler VPX Express edition. A lot of problems I see with others configuring the NetScaler is related to either self-signed certificates or the use of intermediate (e.g., chained) certificates.</p> <p>Using a Startcom [...]]]></description>
			<content:encoded><![CDATA[<p>For a very low cost, it&#8217;s easy to use <a href="https://www.startssl.com/">StartSSL </a>(Startcom) certificates on the <a href="http://www.citrix.com/English/ps2/products/product.asp?contentID=21679">Citrix NetScaler</a> product line. This is includes the free <a href="https://secureportal.citrix.com/MyCitrix/login/EvalLand.aspx?downloadid=1857216&amp;LandingFrom=1004">NetScaler VPX Express </a>edition. A lot of problems I see with others configuring the NetScaler is related to either self-signed certificates or the use of intermediate (e.g., chained) certificates.</p>
<p>Using a Startcom certificate allows for a trusted CA (no certificate errors) and the NetScaler makes it easy to configure intermediate certificates. We&#8217;ll go through the entire process of creating a certificate usable on the NetScaler. The process is also the same for any chained certificate.</p>
<p><span id="more-139"></span></p>
<h3>The Objective</h3>
<p>We want to secure a connection to virtual server on the NetScaler using SSL for a low cost (free for a 30 day certificate or USD$50 for a two-year certificate). Specifically:</p>
<ul>
<li>Low-cost certificate (or certificates)</li>
<li>Valid for all major browsers or servers that will connect to the NetScaler</li>
<li>Imported and bound to a NetScaler Access Gateway Virtual Server</li>
</ul>
<h3>The Environment</h3>
<p>NetScaler VPX Express with the following configuration:</p>
<ul>
<li>Version 9.2 (9.1 or previous versions should work, maybe with changes to the GUI)</li>
<li>NetScaler IP (NIP) and Mapped IP (MIP) already configured</li>
<li>Commands via GUI</li>
<li>Usable IP address for a virtual server (to test)</li>
<li>Administrative access (nsroot) to the NetScaler</li>
</ul>
<p>Other required items:</p>
<ul>
<li>A valid public domain (required for Startcom certificate issuance)</li>
<li>Workstation or server with OpenSSL tools loaded</li>
<li>Startcom account (class 1 or class 2, meaning you have a client certificate)</li>
</ul>
<h3>Create the Certificate</h3>
<p>Prior to any NetScaler configurations, we&#8217;ll first create the certificate and prep the files for the NetScaler. This include the private key, signing request, then downloading the certificate and the certificate chain (intermediate and root certificates). You can do these same steps from the NetScaler GUI, but I&#8217;ve always found having the OpenSSL toolkit around to be consistent across platforms and useful for troubleshooting problems.</p>
<h4>Private Key and Certificate Signing Request (CSR)</h4>
<p>First create a private key of suitable size (I&#8217;m using an URL from my domain as an example):</p>
<pre>D:\Temp&gt;<strong>openssl genrsa -out test.gavinadams.org.key 2048</strong>
Generating RSA private key, 2048 bit long modulus
.........................................................+++
.................+++
e is 65537 (0x10001)
</pre>
<p>Then create the certificate signing request (CSR):</p>
<pre>D:\Temp&gt;<strong>openssl req -new -key test.gavinadams.org.key -out test.gavinadams.org.csr</strong>
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [AU]:<strong>US</strong>
State or Province Name (full name) [Some-State]:<strong>GA</strong>
Locality Name (eg, city) []:Cumming
Organization Name (eg, company) [Internet Widgits Pty Ltd]:<strong>Not used by Startcom</strong>
Organizational Unit Name (eg, section) []:
Common Name (eg, YOUR name) []:<strong>test.gavinadams.org</strong>
Email Address []:

Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []:
An optional company name []:

D:\Temp&gt;<strong>ls test*</strong>
test.gavinadams.org.csr  test.gavinadams.org.key
</pre>
<p>A couple things to note:</p>
<ul>
<li>Organizational name is not used. Common name is not used. Actually, everything but the private key signing portion is thrown out when submitting the request to StartCom. I enter them for consistency though.</li>
<li>There is no password on the private key or CSR, so be careful and protect that key!</li>
</ul>
<h4>Create the Certificate</h4>
<p>Login into the control panel at <a href="https://www.startssl.com/">StartSSL</a> and then go to the <em>StartSSL PKI </em>page. Use the <em>Certificates Wizard </em>to start the process. At different points you will need to copy and paste the contents of the local .csr file and enter the URL for the common name field.</p>
<p>To keep this short I&#8217;ll skip all the steps on the StartCom website and jump the end steps (email me if you&#8217;d like a tutorial on managing StartSSL certificates):</p>
<p><a href="http://www.gavinadams.org/blog/wp-content/uploads/2010/08/retrieve-cert1.png"><img class="alignnone size-full wp-image-237" title="retrieve cert1" src="http://www.gavinadams.org/blog/wp-content/uploads/2010/08/retrieve-cert1.png" alt="" width="844" height="251" /></a></p>
<p><a href="http://www.gavinadams.org/blog/wp-content/uploads/2010/08/retrieve-cert2.png"><img class="alignnone size-full wp-image-238" title="retrieve cert2" src="http://www.gavinadams.org/blog/wp-content/uploads/2010/08/retrieve-cert2.png" alt="" width="564" height="255" /></a></p>
<p><em>Select all </em>and <em>copy </em>the contents to a local text editor and save with the .key file (<strong>test.gavinadams.org.crt</strong> in this example). You can delete the CSR file at this point.</p>
<h3>Download Startcom CA Certificates</h3>
<p>Now download the root and appropriate intermediate certificate. The root is the same for all certificates, but the intermediate will depend upon your class. In this example, it is a class 2 certificate, so I download the<em> Class 2 Intermediate Server CA</em> file.</p>
<p><a href="http://www.gavinadams.org/blog/wp-content/uploads/2010/08/ret-int-and-ca.png"><img class="alignnone size-full wp-image-236" title="Retrieve Intermediate and Root CA" src="http://www.gavinadams.org/blog/wp-content/uploads/2010/08/ret-int-and-ca.png" alt="" width="419" height="375" /></a></p>
<p><a href="http://www.gavinadams.org/blog/wp-content/uploads/2010/08/ret-ca.png"><img class="alignnone size-full wp-image-234" title="Retrieve Root CA" src="http://www.gavinadams.org/blog/wp-content/uploads/2010/08/ret-ca.png" alt="" width="308" height="325" /></a></p>
<p>Save the StartCom Root CA  file as <strong>startcom-ca.pem</strong></p>
<p><a href="http://www.gavinadams.org/blog/wp-content/uploads/2010/08/ret-int.png"><img class="alignnone size-full wp-image-235" title="Retrieve Intermediate Server CA (Class 2)" src="http://www.gavinadams.org/blog/wp-content/uploads/2010/08/ret-int.png" alt="" width="470" height="262" /></a></p>
<p>Save the intermediate file as <strong>startcom-sub.class2.server.server.ca.pem</strong></p>
<h3>Install Certificates into the NetScaler</h3>
<p>At this point we have the following files in a temporary directory (the .csr file is not needed but I normally keep them around until I complete housecleaning):</p>
<p><a href="http://www.gavinadams.org/blog/wp-content/uploads/2010/08/filelist.png"><img class="alignnone size-full wp-image-229" title="Files" src="http://www.gavinadams.org/blog/wp-content/uploads/2010/08/filelist.png" alt="" width="249" height="136" /></a></p>
<p>From the NetScaler configuration page, select <em>SSL-&gt;Certificates</em>, then <em>Add&#8230; </em>from the bottom. Use the GUI to upload the certificate and key along with the root and intermediate CA.</p>
<p><a href="http://www.gavinadams.org/blog/wp-content/uploads/2010/08/test-ga.png"><img class="alignnone size-full wp-image-239" title="test.gavinadams.org" src="http://www.gavinadams.org/blog/wp-content/uploads/2010/08/test-ga.png" alt="" width="621" height="355" /></a></p>
<p style="padding-left: 30px;"><em>Enabling the notification period is optional. I rely upon my network monitoring to provide notice when a certificate is getting close to expiration.</em></p>
<p><a href="http://www.gavinadams.org/blog/wp-content/uploads/2010/08/ns-root-ca.png"><img class="alignnone size-full wp-image-233" title="Upload Root CA" src="http://www.gavinadams.org/blog/wp-content/uploads/2010/08/ns-root-ca.png" alt="" width="621" height="355" /></a></p>
<p>For this and and the intermediate certificates there is no corresponding private key, so only populate the <em>Certificate File Name </em>field.</p>
<p><a href="http://www.gavinadams.org/blog/wp-content/uploads/2010/08/ns-int-ca.png"><img class="alignnone size-full wp-image-232" title="Upload Intermediate Root CA" src="http://www.gavinadams.org/blog/wp-content/uploads/2010/08/ns-int-ca.png" alt="" width="671" height="355" /></a></p>
<p>Finally, on the NetScaler GUI the SSL window should show the three certificates loaded, along with the default self-signed certificates of the NetScaler:</p>
<p><a href="http://www.gavinadams.org/blog/wp-content/uploads/2010/08/cert-list.png"><img class="alignnone size-full wp-image-227" title="NetScaler Certificate List" src="http://www.gavinadams.org/blog/wp-content/uploads/2010/08/cert-list.png" alt="" width="1174" height="52" /></a></p>
<p>My CA names are different as this is on a box where they are already loaded, so note the names in the first column when we link the certificate together. Note the expiry date on the intermediate certificate. The intermediate certificates expire much sooner than the root CA. This is why I download the complete chain from StartCom each time I issue a new certificate. Any new intermediate certificates would need to be uploaded.</p>
<h3>Link the Certificates</h3>
<p>Probably the easiest part of the process. I reckon the linking process is simply combining the PEM formatted certificates into a single file. But the GUI makes it easy. First link the certificate we created to the intermediate by right-clicking on the certificate and selecting Link&#8230;</p>
<p><a href="http://www.gavinadams.org/blog/wp-content/uploads/2010/08/test-with-link-meu.png"><img class="alignnone size-full wp-image-240" title="Link certificate to intermediate" src="http://www.gavinadams.org/blog/wp-content/uploads/2010/08/test-with-link-meu.png" alt="" width="289" height="236" /></a></p>
<p>then select the intermediate certificate and press OK:</p>
<p><a href="http://www.gavinadams.org/blog/wp-content/uploads/2010/08/link-test-to-int.png"><img class="alignnone size-full wp-image-231" title="Link test to intermediate 2" src="http://www.gavinadams.org/blog/wp-content/uploads/2010/08/link-test-to-int.png" alt="" width="288" height="139" /></a></p>
<p>From the certificate window, select the intermediate certificate, right-click, and link to the Root CA:</p>
<p><a href="http://www.gavinadams.org/blog/wp-content/uploads/2010/08/link-inter-to-root.png"><img class="alignnone size-full wp-image-230" title="Link intermediate to Root CA" src="http://www.gavinadams.org/blog/wp-content/uploads/2010/08/link-inter-to-root.png" alt="" width="290" height="139" /></a></p>
<h3>Housekeeping</h3>
<p>At this point we have the certificates and private key loaded in the NetScaler.<span style="text-decoration: underline;"> Back everything up at this point!</span> Before I got into the habit of creating a passphrase protected PKCS12 file, I may have misplaced the certificate, or exposed the unprotected key file. I now create a p12/pfx file with the certificate and key in it. Then it gets backup up to a protected site (<a href="http://keepass.info/">Keepass</a> or something similar). finally, the Keepass file gets uploaded to <a href="https://www.dropbox.com/referrals/NTEwNTIyNDk">Dropbox</a> and synced across my multiple workstations.</p>
<pre>D:\Temp&gt;<strong>openssl pkcs12 -export -in test.gavinadams.org.crt -inkey test.gavinadams.org.key -out test.gavinadams.org.p12</strong>
Enter Export Password:
Verifying - Enter Export Password:

D:\Temp&gt;l<strong>s *p12</strong>
test.gavinadams.org.p12
</pre>
<p>This is important for Startcom issued certificates. I love the price for issuing certs: all you can eat for two years for USD$50 (class 2 validation), but if you lose the certificate, it&#8217;s a USD$25 charge to have it added to the CRL.</p>
<h3>Access Gateway Test</h3>
<p>Okay, the certificate has been created, all portions uploaded, and backed up for safe keeping. Now go to <em>Access Gateway-&gt;Virtual Servers </em>and select <em>Add&#8230;</em> from the bottom of the display:</p>
<p><a href="http://www.gavinadams.org/blog/wp-content/uploads/2010/08/create-virt-cert.png"><img class="alignnone size-full wp-image-228" title="Create test.gavinadams.org Virtual Server" src="http://www.gavinadams.org/blog/wp-content/uploads/2010/08/create-virt-cert.png" alt="" width="817" height="664" /></a></p>
<p>Important parts are the Name, IP address, and certificate selected. If testing, choose an unused IP address and ensure a DNS or hosts file entry exists, then use a browser to hit the site (Firefox 3.6 used here):</p>
<p><a href="http://www.gavinadams.org/blog/wp-content/uploads/2010/08/browser-page.png"><img class="alignnone size-full wp-image-226" title="Hit the site via a browser" src="http://www.gavinadams.org/blog/wp-content/uploads/2010/08/browser-page.png" alt="" width="778" height="385" /></a></p>
<p>You should get a validSSL lock from the log in page. This validates the NetScaler and the certificate is working fine. At this point you can remove the Access Gateway Virtual Server. The certificates are still on the NetScaler and can be bound to other items where SSL is used.</p>
<h3>Summary</h3>
<p>Hopefully not too long of a post. Briefly:</p>
<ol>
<li>Create a Startcom web server certificate</li>
<li>Upload the certificate, private key and Startcom CA certs (root and intermediate) to the NetScaler</li>
<li>Link the certificates on the NetScaler and bind the web server certificate to a Access Gateway Virtual Server</li>
<li>Use a web browser to verify the SSL connection</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.gavinadams.org/blog/2010/08/02/startssl-startcom-certificates-on-the-citrix-netscaler/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Best Presentation of XenDesktop 4 on Windows</title>
		<link>http://www.gavinadams.org/blog/2010/07/23/best-presentation-of-xendesktop-4-to-windows/</link>
		<comments>http://www.gavinadams.org/blog/2010/07/23/best-presentation-of-xendesktop-4-to-windows/#comments</comments>
		<pubDate>Fri, 23 Jul 2010 19:40:01 +0000</pubDate>
		<dc:creator>me@gavinadams.org</dc:creator>
				<category><![CDATA[XenDesktop]]></category>
		<category><![CDATA[Citrix]]></category>

		<guid isPermaLink="false">http://www.gavinadams.org/blog/?p=214</guid>
		<description><![CDATA[<p>XenDesktop 4 has raised the bar for virtual desktop (VDI) solutions. It&#8217;s now easier to provide a virtual desktop to users on differing operation systems and platforms. And having Citrix on the iPhone / iPad is just amazing eye candy too.</p> <p>By default, all the tutorials for installing XenDesktop use the defaults. This means that [...]]]></description>
			<content:encoded><![CDATA[<p>XenDesktop 4 has raised the bar for virtual desktop (VDI) solutions. It&#8217;s now easier to provide a virtual desktop to users on differing operation systems and platforms. And having Citrix on the iPhone / iPad is just amazing eye candy too.</p>
<p>By default, all the tutorials for installing XenDesktop use the defaults. This means that under Windows, using a browser to connect and launch a session from web interface uses the online plug-in module. It works, provides multi-monitor capability, but has display artifacts and no nifty bar to manage USB connection and such. Besides this client, the Desktop Viewer can also be used as the default (if installed).</p>
<p><span id="more-214"></span></p>
<p>With the 11.x and 12.0 clients it&#8217;s easy to change. First install the <strong>Citrix Online plug-in</strong> (<em>not </em>the <strong>Citrix Online plugin &#8211; web</strong> which is smaller and doesn&#8217;t include the Desktop client) from <a href="http://www.citrix.com/English/ss/downloads/index.asp">here</a>. You&#8217;ll have to navigate to the OS X client, Citrix seems to change the URL for the downloads.</p>
<p>From the web interface server that services XenDesktop, browse to the conf directory and edit webinterface.conf. For example, /Citrix/WebDesktop2 is located here:</p>
<p><a href="http://www.gavinadams.org/blog/wp-content/uploads/2010/07/wiconfdir.png"><img class="alignnone size-full wp-image-217" title="wiconfdir" src="http://www.gavinadams.org/blog/wp-content/uploads/2010/07/wiconfdir.png" alt="" width="426" height="387" /></a></p>
<p>Edit the file and search for ShowDesktopViewer and change the line from:</p>
<pre># ShowDesktopViewer=Off</pre>
<p>to the following:</p>
<pre>ShowDesktopViewer=On</pre>
<p>Next time a session is launched, the Desktop Viewer will be used instead of the online plugin. This doesn&#8217;t work under OS X as there really isn&#8217;t a better client than Desktop Viewer yet. Thanks to <a href="http://www.parmiter.com/citrix/citrix-web-interface/2010/01/RP628">Richard Parmiter</a> for documenting this!</p>
<p><em>Hint</em>: To get mult-monitor under Desktop Viewer, re-size to something less than full screen, move the window over the two monitors and re-size to full screen. This setting will persist across sessions.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gavinadams.org/blog/2010/07/23/best-presentation-of-xendesktop-4-to-windows/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

