<?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>JasonSamuel.com &#187; Citrix</title>
	<atom:link href="http://www.jasonsamuel.com/tag/citrix/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jasonsamuel.com</link>
	<description>Cool stuff I see in the IT world</description>
	<lastBuildDate>Sat, 17 Jul 2010 21:35:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=abc</generator>
		<item>
		<title>Getting around Netscaler Client IP issues without having to use USIP</title>
		<link>http://www.jasonsamuel.com/2010/07/16/getting-around-netscaler-client-ip-issues-without-having-to-use-usip/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=getting-around-netscaler-client-ip-issues-without-having-to-use-usip</link>
		<comments>http://www.jasonsamuel.com/2010/07/16/getting-around-netscaler-client-ip-issues-without-having-to-use-usip/#comments</comments>
		<pubDate>Fri, 16 Jul 2010 21:58:01 +0000</pubDate>
		<dc:creator>Jason Samuel</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Citrix NetScaler]]></category>
		<category><![CDATA[IIS]]></category>
		<category><![CDATA[Citrix]]></category>
		<category><![CDATA[netscaler]]></category>

		<guid isPermaLink="false">http://www.jasonsamuel.com/?p=552</guid>
		<description><![CDATA[If you work with Netscalers, you already know how SNIPs and MIPs work. They are the IPs that communicate with your servers. Every packet from the outside world that passes through the Netscaler will hit your server as though it was coming from this IP. This is the default behavior on a Netscaler. Unfortunately if [...]<p><a href="http://www.jasonsamuel.com/2010/07/16/getting-around-netscaler-client-ip-issues-without-having-to-use-usip/">Getting around Netscaler Client IP issues without having to use USIP</a> is a post from: <a href="http://www.jasonsamuel.com">JasonSamuel.com</a></p>



More of my posts you might like:<ol><li><a href='http://www.jasonsamuel.com/2010/07/09/how-to-monitor-realtime-traffic-stats-accurately-on-a-citrix-netscaler/' rel='bookmark' title='Permanent Link: How to monitor realtime traffic stats accurately on a Citrix Netscaler'>How to monitor realtime traffic stats accurately on a Citrix Netscaler</a></li>
<li><a href='http://www.jasonsamuel.com/2010/06/22/how-to-update-your-citrix-netscaler-firmware/' rel='bookmark' title='Permanent Link: How to update your Citrix Netscaler firmware'>How to update your Citrix Netscaler firmware</a></li>
<li><a href='http://www.jasonsamuel.com/2010/06/29/how-to-really-set-a-netscaler-back-to-factory-defaults-factory-new-condition/' rel='bookmark' title='Permanent Link: How to REALLY set a Netscaler back to factory defaults (factory new condition)'>How to REALLY set a Netscaler back to factory defaults (factory new condition)</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>If you work with Netscalers, you already know how SNIPs and MIPs work.  They are the IPs that communicate with your servers.  Every packet from the outside world that passes through the Netscaler will hit your server as though it was coming from this IP.  This is the default behavior on a Netscaler.</p>
<p><a href="http://www.jasonsamuel.com/wp-content/uploads/2010/07/citrix_netscaler_in_action.jpg"><img src="http://www.jasonsamuel.com/wp-content/uploads/2010/07/citrix_netscaler_in_action.jpg" alt="" title="citrix_netscaler_in_action" width="410" height="287" class="aligncenter size-full wp-image-572" /></a></p>
<p>Unfortunately if your servers require the client&#8217;s true IP address, all you will see for every client will be the SNIP or MIP address you are using.  Here are a few examples I have personally had to deal with:</p>
<p>- IIS requires client IP for IIS logs<br />
- IIS requires client IP for ACL filtering<br />
- Web application requires client IP for it&#8217;s own logging purposes<br />
- Web application requires cilent IP for authentication</p>
<p>Now to get around this for IIS, you can install ISAPI filters and set your Netscaler to use a custom header to store the true client IP address and pass that along with every packet.  The ISAPI filter in IIS would look for this particular header and log that instead of the SNIP/MIP.  There&#8217;s a very nice Client IP extraction ISAPI filter with some great instructions located on this page from Citrix or you can even write your own:</p>
<p><a href="http://support.citrix.com/article/CTX119347">http://support.citrix.com/article/CTX119347</a></p>
<p>This is great for logging but sometimes your web application may grab the IP address from web server variables.  To return the IP address of the host making the request, the server variable that your ASP, ASP.NET, and PHP code will call is &#8220;REMOTE_ADDR&#8221;.  Unfortunately REMOTE_ADR is going to have your SNIP IP and not the client IP when passing through the Netscaler.  The good news is that if you have control of your code, you can make it call from a different location that includes the client IP your ISAPI filter is passing.  So if your code currently uses:</p>
<blockquote><p>Request.ServerVariables(&#8220;REMOTE_ADDR&#8221;)</p></blockquote>
<p>then switch it to:</p>
<blockquote><p>Request.ServerVariables(&#8220;http_client_ip&#8221;)</p></blockquote>
<p>where &#8220;http_client_ip&#8221; is the real client IP address and not the SNIP.  Everything will work fine after that.</p>
<p>Here&#8217;s a nice snippet of code you can run on your web server and hit from your client browser to see what all the Netscaler is passing to the server:</p>
<blockquote><p>
&lt;html&gt;<br />
&lt;body&gt;<br />
&lt;p&gt;<br />
NS SNIP or MIP IP address:<br />
&lt;%Response.Write(Request.ServerVariables(&#8220;remote_addr&#8221;))%&gt;<br />
&lt;br&gt;<br />
&lt;b&gt;The NS Inserted Client IP:&lt;/b&gt;<br />
&lt;%Response.Write(Request.ServerVariables(&#8220;http_Client_ip&#8221;))%&gt;<br />
&lt;br&gt;<br />
Accept Encoding:<br />
&lt;%Response.Write(Request.ServerVariables(&#8220;HTTP_ACCEPT_ENCODING&#8221;))%&gt;<br />
&lt;br&gt;<br />
Cookies:<br />
&lt;%Response.Write(Request.ServerVariables(&#8220;HTTP_COOKIE&#8221;))%&gt;<br />
&lt;br&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;
</p></blockquote>
<p>(<strong>***Note</strong>, I apologize in advance if WordPress messes up the code block above.  It usually changes the quotes in the code around so if you have issues with it, I will host a .txt file here with the code.  Just comment to this post if you need it.)</p>
<p>This is all well and good when you have access to the code and can make this change but what about web apps that are 3rd party and you cannot modify the code?  Well then you have no choice but to use the USIP (Use Source IP) feature on the Netscaler.  What this does is pass the client IP straight through the Netscaler to your backend server so that the SNIP or MIP you are using on your Netscaler is never seen by the server (except for monitor probes from the Netscaler itself of course).  This option is disabled by default.  It can be applied to the entire Netscaler or turned on and off per service.</p>
<p>Best practice is not to use it and avoid it as much as possible.  The reason is that using the USIP feature means you are going to lose very important features on the Netscaler such as connection multiplexing and surge protection.  It&#8217;s always better to use the Client IP header insertion instead.  In fact to date I have personally never enabled USIP in any environment I have built so far.</p>
<p>Here&#8217;s a very excellent and recent article from Citrix on the pros and cons of using USIP mode:</p>
<p><a href="http://support.citrix.com/article/CTX121974">http://support.citrix.com/article/CTX121974</a></p>
<p>I hope this helps anyone trying to get around Client IP address related issues.  Please feel free to post a comment on your own experiences or suggestions.</p>
<p><a href="http://www.jasonsamuel.com/2010/07/16/getting-around-netscaler-client-ip-issues-without-having-to-use-usip/">Getting around Netscaler Client IP issues without having to use USIP</a> is a post from: <a href="http://www.jasonsamuel.com">JasonSamuel.com</a></p>


<p>More of my posts you might like:<ol><li><a href='http://www.jasonsamuel.com/2010/07/09/how-to-monitor-realtime-traffic-stats-accurately-on-a-citrix-netscaler/' rel='bookmark' title='Permanent Link: How to monitor realtime traffic stats accurately on a Citrix Netscaler'>How to monitor realtime traffic stats accurately on a Citrix Netscaler</a></li>
<li><a href='http://www.jasonsamuel.com/2010/06/22/how-to-update-your-citrix-netscaler-firmware/' rel='bookmark' title='Permanent Link: How to update your Citrix Netscaler firmware'>How to update your Citrix Netscaler firmware</a></li>
<li><a href='http://www.jasonsamuel.com/2010/06/29/how-to-really-set-a-netscaler-back-to-factory-defaults-factory-new-condition/' rel='bookmark' title='Permanent Link: How to REALLY set a Netscaler back to factory defaults (factory new condition)'>How to REALLY set a Netscaler back to factory defaults (factory new condition)</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.jasonsamuel.com/2010/07/16/getting-around-netscaler-client-ip-issues-without-having-to-use-usip/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to monitor realtime traffic stats accurately on a Citrix Netscaler</title>
		<link>http://www.jasonsamuel.com/2010/07/09/how-to-monitor-realtime-traffic-stats-accurately-on-a-citrix-netscaler/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=how-to-monitor-realtime-traffic-stats-accurately-on-a-citrix-netscaler</link>
		<comments>http://www.jasonsamuel.com/2010/07/09/how-to-monitor-realtime-traffic-stats-accurately-on-a-citrix-netscaler/#comments</comments>
		<pubDate>Fri, 09 Jul 2010 17:07:45 +0000</pubDate>
		<dc:creator>Jason Samuel</dc:creator>
				<category><![CDATA[Citrix NetScaler]]></category>
		<category><![CDATA[Citrix]]></category>
		<category><![CDATA[connectiontable]]></category>
		<category><![CDATA[netscaler]]></category>
		<category><![CDATA[nsconmsg]]></category>

		<guid isPermaLink="false">http://www.jasonsamuel.com/?p=504</guid>
		<description><![CDATA[The GUI on a Citrix Netscaler is nice but it takes 7 seconds to update and sometimes you need live stats and a 7 second delay is not going to work for you. You can do A LOT through command line you can&#8217;t through the GUI (isn&#8217;t that the case with pretty much anything though? [...]<p><a href="http://www.jasonsamuel.com/2010/07/09/how-to-monitor-realtime-traffic-stats-accurately-on-a-citrix-netscaler/">How to monitor realtime traffic stats accurately on a Citrix Netscaler</a> is a post from: <a href="http://www.jasonsamuel.com">JasonSamuel.com</a></p>



More of my posts you might like:<ol><li><a href='http://www.jasonsamuel.com/2010/06/22/how-to-reset-a-citrix-netscaler-back-to-factory-defaults/' rel='bookmark' title='Permanent Link: How to reset a Citrix Netscaler back to factory defaults'>How to reset a Citrix Netscaler back to factory defaults</a></li>
<li><a href='http://www.jasonsamuel.com/2010/06/22/how-to-update-your-citrix-netscaler-firmware/' rel='bookmark' title='Permanent Link: How to update your Citrix Netscaler firmware'>How to update your Citrix Netscaler firmware</a></li>
<li><a href='http://www.jasonsamuel.com/2010/06/28/setting-the-date-time-and-time-zone-in-freebsd-on-your-citrix-netscaler/' rel='bookmark' title='Permanent Link: Setting the date, time, and time zone in FreeBSD on your Citrix Netscaler'>Setting the date, time, and time zone in FreeBSD on your Citrix Netscaler</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>The GUI on a Citrix Netscaler is nice but it takes 7 seconds to update and sometimes you need live stats and a 7 second delay is not going to work for you.  You can do A LOT through command line you can&#8217;t through the GUI (isn&#8217;t that the case with pretty much anything though? <img src='http://www.jasonsamuel.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> ).   I am writing this article to show you how to get stats on each of your VIPS and servers quickly and also monitor live connections and traffic into your appliance.</p>
<p>&nbsp;</p>
<p><a href="http://www.jasonsamuel.com/wp-content/uploads/2010/06/citrix-netscaler.jpg"><img src="http://www.jasonsamuel.com/wp-content/uploads/2010/06/citrix-netscaler.jpg" alt="" title="citrix-netscaler" width="313" height="90" class="aligncenter size-full wp-image-460" /></a></p>
<p>&nbsp;</p>
<p><strong>GETTING DETAILS</strong><br />
First, you might want to get some details on your Load Balanced VIP.  I am calling my Load Balanced VIP &#8220;lb_vsvr_name&#8221; in this example.  Here is how you do that:</p>
<p>1. SSH into the Netscaler using Putty<br />
2. Type:</p>
<blockquote><p>sh lb vserver lb_vsvr_name</p></blockquote>
<p>You will immediately see a lot of stats on how this VIP is configured like it&#8217;s IP, it&#8217;s status, connection method, persistency, bound service groups, etc.  Pay attention to the bound service groups.  So to get details on one of those, type this where &#8220;svcgrp_name&#8221; is the name of your service group:</p>
<p>3. Now type:</p>
<blockquote><p>sh servicegroup svcgrp_name</p></blockquote>
<p>This will show you details on the service group such as the status and the individual back end servers.  Let&#8217;s say you have two servers called &#8220;svr_name1&#8243; and &#8220;svr_name2&#8243;.  To get the details on those backend servers:</p>
<p>4. Type:</p>
<blockquote><p>sh server svr_name1</p></blockquote>
<p>and</p>
<blockquote><p>sh server svr_name2</p></blockquote>
<p>This will pull up stats on each of your backend servers.</p>
<p>&nbsp;</p>
<p><strong>GETTING REALTIME GENERAL PERFORMANCE STATS</strong><br />
1. Make sure you are still SSHed into the Netscaler using Putty<br />
2. Type &#8220;shell&#8221; to enter the FreeBSD shell<br />
3. Capitalization matters below or you will get an error. Type:</p>
<blockquote><p>nsconmsg -s ConLB=2 -d oldconmsg</p></blockquote>
<p>What this does is pull up realtime general stats on all your VIPs and services and continues to update it every 7 seconds until your press Ctrl+C to stop it. I know the display has a ton of info in it but Citrix actually has some very good documentation on how to read it all here:  <a href="http://support.citrix.com/article/CTX113341">http://support.citrix.com/article/CTX113341</a></p>
<p>&nbsp;</p>
<p><strong>GETTING REALTIME TRAFFIC &amp; CONNECTION STATS</strong><br />
Now that you have verified the VIP is up and have it&#8217;s IP and bound service groups.  Here is how you can SSH into the Netscaler and get live traffic and connection stats for the VIP itself:</p>
<p>1. Make sure you are still SSHed into the Netscaler using Putty<br />
2. Make sure you are not in the shell.  Type &#8220;exit&#8221; if you are still in it from doing the previous section.<br />
3. Now type:</p>
<blockquote><p>shconnectiontable</p></blockquote>
<p>This will give you every connection coming into the Netscaler.  The columns displayed are in this order:</p>
<p>SRCIP = source IP address<br />
SRCPORT = source port<br />
DSTIP = destination IP address<br />
DSTPORT = destination port<br />
SVCTYPE = service type like HTTP, SSL, etc.<br />
IDLTIME = idle time of that connection in milliseconds<br />
STATE = current state of the connection, you will usually see it either waiting or established</p>
<p>Pretty hard to look at if the device you are looking at is in production and has a ton of traffic on it.  So we need to filter this display.  Let&#8217;s just look at how many connections we have to just one of the backend servers above.  Type:</p>
<blockquote><p>sh connectiontable | grep xxx.xxx.xxx.xx</p></blockquote>
<p>or</p>
<blockquote><p>sh connectionable &#8220;ip == xxx.xxx.xxx.xx&#8221;</p></blockquote>
<p>where xxx.xxx.xxx.xxx is the IP address of one of the backend servers above.  This will give you stats on all the connections to that backend server.</p>
<p>1. Anything that says &#8220;MONITOR&#8221; is the Netscaler itself testing for uptime so ignore those.<br />
2. If you see &#8220;MONITORS&#8221;, ignore those too, they are just SSL based monitors.<br />
3. If you see &#8220;HTTP&#8221; or &#8220;SSL&#8221;, that&#8217;s the real traffic you are after.  Note if they say &#8220;TIME_WAIT&#8221; or &#8220;ESTABLISHED&#8221;.  If it&#8217;s live traffic, the state should be an established connection.</p>
<p>Let&#8217;s get into some more advanced filtering.  Let&#8217;s say you want to filter all monitors to that IP and only display SSL, HTTP, etc:</p>
<blockquote><p>sh connectiontable &#8220;ip == xxx.xxx.xxx.xxx &amp;&amp; svctype != MONITOR&#8221;</p></blockquote>
<p>Let&#8217;s say you want to see all traffic to that IP but only established connections.  Here is the syntax for that:</p>
<blockquote><p>sh connectiontable &#8220;ip == xxx.xxx.xxx.xxx &amp;&amp; state == established&#8221;</p></blockquote>
<p>Let&#8217;s say I want all the traffic to that IP, established connections only, and only display SSL connections:</p>
<blockquote><p>sh connectiontable &#8220;ip == xxx.xxx.xxx.xxx &amp;&amp; state == established &amp;&amp; svctype == SSL&#8221;</p></blockquote>
<p>&nbsp;</p>
<p>One thing to note, typically you can filter additional service types like this:</p>
<blockquote><p>sh connectiontable &#8220;ip == xxx.xxx.xxx.xxx &#038;&#038; svctype != MONITOR &#038;&#038; svctype != SSL&#8221;</p></blockquote>
<p>but I found that if you have &#8220;MONITORS&#8221; and you wanted to filter them, it does not work and gives you an error saying it&#8217;s an invalid command. I actually have an open ticket with Citrix about this bug so it should be fixed in a future release.  In the meantime, just use a combination of a filter expression and grep to filter it out.  Here&#8217;s an example:</p>
<blockquote><p>sh connectiontable &#8220;ip == xxx.xxx.xxx.xxx &#038;&#038; svctype != MONITOR&#8221; | grep -v MONITORS</p></blockquote>
<p>&nbsp;</p>
<p><strong>FURTHER READING</strong><br />
If you need further info on commands and syntax available on the Netscaler, I have hosted the Citrix Netscaler Command Reference Guide for 9.1 here:</p>
<p><a href='http://www.jasonsamuel.com/wp-content/uploads/2010/07/NS-CommandReference-Guide.pdf'>NS-CommandReference-Guide.pdf</a></p>
<p>Yes it&#8217;s 1742 pages but take the time to flip through it.  It&#8217;s extremely powerful. The connectiontable related syntax begins on page 883 (873 in the guide). <img src='http://www.jasonsamuel.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><a href="http://www.jasonsamuel.com/2010/07/09/how-to-monitor-realtime-traffic-stats-accurately-on-a-citrix-netscaler/">How to monitor realtime traffic stats accurately on a Citrix Netscaler</a> is a post from: <a href="http://www.jasonsamuel.com">JasonSamuel.com</a></p>


<p>More of my posts you might like:<ol><li><a href='http://www.jasonsamuel.com/2010/06/22/how-to-reset-a-citrix-netscaler-back-to-factory-defaults/' rel='bookmark' title='Permanent Link: How to reset a Citrix Netscaler back to factory defaults'>How to reset a Citrix Netscaler back to factory defaults</a></li>
<li><a href='http://www.jasonsamuel.com/2010/06/22/how-to-update-your-citrix-netscaler-firmware/' rel='bookmark' title='Permanent Link: How to update your Citrix Netscaler firmware'>How to update your Citrix Netscaler firmware</a></li>
<li><a href='http://www.jasonsamuel.com/2010/06/28/setting-the-date-time-and-time-zone-in-freebsd-on-your-citrix-netscaler/' rel='bookmark' title='Permanent Link: Setting the date, time, and time zone in FreeBSD on your Citrix Netscaler'>Setting the date, time, and time zone in FreeBSD on your Citrix Netscaler</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.jasonsamuel.com/2010/07/09/how-to-monitor-realtime-traffic-stats-accurately-on-a-citrix-netscaler/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to reset a Citrix Netscaler back to factory defaults</title>
		<link>http://www.jasonsamuel.com/2010/06/22/how-to-reset-a-citrix-netscaler-back-to-factory-defaults/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=how-to-reset-a-citrix-netscaler-back-to-factory-defaults</link>
		<comments>http://www.jasonsamuel.com/2010/06/22/how-to-reset-a-citrix-netscaler-back-to-factory-defaults/#comments</comments>
		<pubDate>Tue, 22 Jun 2010 23:14:51 +0000</pubDate>
		<dc:creator>Jason Samuel</dc:creator>
				<category><![CDATA[Citrix NetScaler]]></category>
		<category><![CDATA[Citrix]]></category>
		<category><![CDATA[netscaler]]></category>

		<guid isPermaLink="false">http://www.jasonsamuel.com/?p=449</guid>
		<description><![CDATA[On older Netscaler appliances, the command to clear your Netscaler configuration and reset it to factory defaults used to be: clear config –c y But on newer devices, the command is: clear ns config level where level is one of the following: 1. basic &#8211; which clears everything except NSIP, MIPs, SNIPs, network settings, HA, [...]<p><a href="http://www.jasonsamuel.com/2010/06/22/how-to-reset-a-citrix-netscaler-back-to-factory-defaults/">How to reset a Citrix Netscaler back to factory defaults</a> is a post from: <a href="http://www.jasonsamuel.com">JasonSamuel.com</a></p>



More of my posts you might like:<ol><li><a href='http://www.jasonsamuel.com/2010/06/22/how-to-update-your-citrix-netscaler-firmware/' rel='bookmark' title='Permanent Link: How to update your Citrix Netscaler firmware'>How to update your Citrix Netscaler firmware</a></li>
<li><a href='http://www.jasonsamuel.com/2009/12/02/how-to-reset-the-root-user-account-for-a-mysql-database/' rel='bookmark' title='Permanent Link: How to reset the root user account for a MySQL database'>How to reset the root user account for a MySQL database</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>On older Netscaler appliances, the command to clear your Netscaler configuration and reset it to factory defaults used to be: </p>
<p>clear config –c y</p>
<p>But on newer devices, the command is:</p>
<p>clear ns config level</p>
<p>where level is one of the following:</p>
<p>1. basic &#8211; which clears everything except NSIP, MIPs, SNIPs, network settings, HA, features, and the nsroot account</p>
<p>2. extended &#8211; which clears everything except NSIP, MIPs, SNIPs, network settings, &#038; HA</p>
<p>3. full &#8211; which clears everything except teh NSIP and default gateway</p>
<p>So typically, I type this to do a full wipe:</p>
<p>clear ns config full</p>
<p>You can also do this through the GUI by going to System > Diagnostics > Maintenance > Clear Configuration.  Use the drop down box to select basic, extended, or full then click the Run button.</p>
<p>With that said, I have run across newer devices (even running NS 9.1 and newer) that just don&#8217;t clear all their config info.  For those, I have just done the following to reset:</p>
<p>1. SSH using Putty into the Netscaler and login<br />
2. Type &#8220;shell&#8221; to enter shell<br />
3. cd /nsconfig<br />
4. Rename the configuration by typing &#8220;mv ns.conf ns.conf.bak&#8221;<br />
5. Type reboot</p>
<p>This should reset the device to the IP of 192.168.100.1 with the nsroot/nsroot account credentials.  Your licenses and SSL certs will remain though since these are files and not part of the Netscaler config.  You will have to delete them manually via WinSCP.</p>
<p>UPDATE 6/29/10:  To completely reset your Netscaler to &#8220;factory new&#8221; conditions, it&#8217;s a little bit more work but I have outlined the procedure here:</p>
<p><a href="http://www.jasonsamuel.com/2010/06/29/how-to-really-set-a-netscaler-back-to-factory-defaults-factory-new-condition/">http://www.jasonsamuel.com/2010/06/29/how-to-really-set-a-netscaler-back-to-factory-defaults-factory-new-condition/</a></p>
<p><a href="http://www.jasonsamuel.com/2010/06/22/how-to-reset-a-citrix-netscaler-back-to-factory-defaults/">How to reset a Citrix Netscaler back to factory defaults</a> is a post from: <a href="http://www.jasonsamuel.com">JasonSamuel.com</a></p>


<p>More of my posts you might like:<ol><li><a href='http://www.jasonsamuel.com/2010/06/22/how-to-update-your-citrix-netscaler-firmware/' rel='bookmark' title='Permanent Link: How to update your Citrix Netscaler firmware'>How to update your Citrix Netscaler firmware</a></li>
<li><a href='http://www.jasonsamuel.com/2009/12/02/how-to-reset-the-root-user-account-for-a-mysql-database/' rel='bookmark' title='Permanent Link: How to reset the root user account for a MySQL database'>How to reset the root user account for a MySQL database</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.jasonsamuel.com/2010/06/22/how-to-reset-a-citrix-netscaler-back-to-factory-defaults/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How to update your Citrix Netscaler firmware</title>
		<link>http://www.jasonsamuel.com/2010/06/22/how-to-update-your-citrix-netscaler-firmware/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=how-to-update-your-citrix-netscaler-firmware</link>
		<comments>http://www.jasonsamuel.com/2010/06/22/how-to-update-your-citrix-netscaler-firmware/#comments</comments>
		<pubDate>Tue, 22 Jun 2010 17:14:17 +0000</pubDate>
		<dc:creator>Jason Samuel</dc:creator>
				<category><![CDATA[Citrix NetScaler]]></category>
		<category><![CDATA[Citrix]]></category>
		<category><![CDATA[netscaler]]></category>

		<guid isPermaLink="false">http://www.jasonsamuel.com/?p=444</guid>
		<description><![CDATA[I&#8217;m doing some firmware updates on Citrix Netscaler appliances today and thought I would give you guys a quick guide on how to do this. This applies to all legacy appliances, MPX appliances, and VPX appliances. You use the same procedure for both Classic and nCore firmware packages. It is very easy to do. 1. [...]<p><a href="http://www.jasonsamuel.com/2010/06/22/how-to-update-your-citrix-netscaler-firmware/">How to update your Citrix Netscaler firmware</a> is a post from: <a href="http://www.jasonsamuel.com">JasonSamuel.com</a></p>



More of my posts you might like:<ol><li><a href='http://www.jasonsamuel.com/2010/01/07/how-to-convert-an-ssl-cert-to-a-pem-for-installation-on-citrix-and-cisco-appliances/' rel='bookmark' title='Permanent Link: How to convert an SSL cert to a .pem for installation on Citrix and Cisco appliances'>How to convert an SSL cert to a .pem for installation on Citrix and Cisco appliances</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m doing some firmware updates on Citrix Netscaler appliances today and thought I would give you guys a quick guide on how to do this.  This applies to all legacy appliances, MPX appliances, and VPX appliances.  You use the same procedure for both Classic and nCore firmware packages.  It is very easy to do. <img src='http://www.jasonsamuel.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>1. Login to MyCitrix at <a href="http://citrix.com/English/mycitrix/index.asp">http://citrix.com/English/mycitrix/index.asp</a> and download the firmware .tgz package.  Make sure to check compatability with your appliance before downloading.  </p>
<p>2. Use WinSCP to transfer the package to the /var/nsinstall directory on your appliance.</p>
<p>3. SSH into your appliance using Putty and type &#8220;shell&#8221; to enter the shell</p>
<p>4. Type cd /var/nsinstall</p>
<p>5. Type ls to list the contents of the directory and verify your newly uploaded firmware package is there</p>
<p>6. Now type &#8220;tar -zxvf build-xxxxxxxx.tgz&#8221; to unzip the package</p>
<p>7. Then type &#8220;installns&#8221; to begin the install.  Should take about 30 seconds to copy to flash and install.</p>
<p>8. Reboot the appliance once prompted for it (just type Y).</p>
<p>9. Login via the web GUI and verify the firmware version in the top right corner is the same as the package you were trying to apply.</p>
<p><a href="http://www.jasonsamuel.com/2010/06/22/how-to-update-your-citrix-netscaler-firmware/">How to update your Citrix Netscaler firmware</a> is a post from: <a href="http://www.jasonsamuel.com">JasonSamuel.com</a></p>


<p>More of my posts you might like:<ol><li><a href='http://www.jasonsamuel.com/2010/01/07/how-to-convert-an-ssl-cert-to-a-pem-for-installation-on-citrix-and-cisco-appliances/' rel='bookmark' title='Permanent Link: How to convert an SSL cert to a .pem for installation on Citrix and Cisco appliances'>How to convert an SSL cert to a .pem for installation on Citrix and Cisco appliances</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.jasonsamuel.com/2010/06/22/how-to-update-your-citrix-netscaler-firmware/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How to convert an SSL cert to a .pem for installation on Citrix and Cisco appliances</title>
		<link>http://www.jasonsamuel.com/2010/01/07/how-to-convert-an-ssl-cert-to-a-pem-for-installation-on-citrix-and-cisco-appliances/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=how-to-convert-an-ssl-cert-to-a-pem-for-installation-on-citrix-and-cisco-appliances</link>
		<comments>http://www.jasonsamuel.com/2010/01/07/how-to-convert-an-ssl-cert-to-a-pem-for-installation-on-citrix-and-cisco-appliances/#comments</comments>
		<pubDate>Thu, 07 Jan 2010 16:35:58 +0000</pubDate>
		<dc:creator>Jason Samuel</dc:creator>
				<category><![CDATA[Cisco IronPort]]></category>
		<category><![CDATA[Citrix NetScaler]]></category>
		<category><![CDATA[IIS]]></category>
		<category><![CDATA[.cer]]></category>
		<category><![CDATA[.pem]]></category>
		<category><![CDATA[.pfx]]></category>
		<category><![CDATA[Cisco]]></category>
		<category><![CDATA[Citrix]]></category>
		<category><![CDATA[OpenSSL]]></category>
		<category><![CDATA[pkcs12]]></category>
		<category><![CDATA[ssl]]></category>
		<category><![CDATA[SSL certificate]]></category>

		<guid isPermaLink="false">http://www.jasonsamuel.com/?p=302</guid>
		<description><![CDATA[Often times you might have to add an SSL cert to a Cisco or Citrix appliance but it only accepts the SSL cert and private key in a certain format.  Your CA (certificate authority) will issue the SSL cert to you as a .crt.  From there, you need to package the cert with the private [...]<p><a href="http://www.jasonsamuel.com/2010/01/07/how-to-convert-an-ssl-cert-to-a-pem-for-installation-on-citrix-and-cisco-appliances/">How to convert an SSL cert to a .pem for installation on Citrix and Cisco appliances</a> is a post from: <a href="http://www.jasonsamuel.com">JasonSamuel.com</a></p>



More of my posts you might like:<ol><li><a href='http://www.jasonsamuel.com/2009/03/12/ssl-certificate-chains-explained/' rel='bookmark' title='Permanent Link: SSL certificate chains explained'>SSL certificate chains explained</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.jasonsamuel.com/wp-content/uploads/2010/01/2.gif"></a>Often times you might have to add an SSL cert to a Cisco or Citrix appliance but it only accepts the SSL cert and private key in a certain format.  Your CA (certificate authority) will issue the SSL cert to you as a .crt.  From there, you need to package the cert with the private key and in the format your appliance requires.  There are different ways to do this and one easy way I like is using IIS and OpenSSL which is a free open source tool and can be downloaded here:  <a href="http://www.openssl.org" target="_blank">http://www.openssl.org</a></p>
<p>1. Create a temporary site in IIS and generate a CSR.  Make sure the CN (common name) you enter matches whatever appliance you are trying to generate it for exmp:  wireless.mycompany.com</p>
<p>2.  Submit the CSR to your CA such as Verisign, GoDaddy, Network Solutions, etc. and wait for them to validate and issue your cert.</p>
<p>3. Get the .crt from the CA once they issue it and convert it to .cer.  Just open the .crt by double clicking on it and and save it as .cer using the export wizard.  This is necessary since IIS does not accept .crt.</p>
<p><a href="http://www.jasonsamuel.com/wp-content/uploads/2010/01/1.gif"><img class="alignnone size-medium wp-image-307" title="1" src="http://www.jasonsamuel.com/wp-content/uploads/2010/01/1-254x300.gif" alt="" width="254" height="300" /></a> <a href="http://www.jasonsamuel.com/wp-content/uploads/2010/01/2.gif"><img title="2" src="http://www.jasonsamuel.com/wp-content/uploads/2010/01/2-254x300.gif" alt="" width="254" height="300" /></a><a href="http://www.jasonsamuel.com/wp-content/uploads/2010/01/3.gif"> <img class="alignnone size-medium wp-image-310" title="3" src="http://www.jasonsamuel.com/wp-content/uploads/2010/01/3-300x234.gif" alt="" width="300" height="234" /></a> <a href="http://www.jasonsamuel.com/wp-content/uploads/2010/01/4.gif"><img class="alignnone size-medium wp-image-311" title="4" src="http://www.jasonsamuel.com/wp-content/uploads/2010/01/4-300x234.gif" alt="" width="300" height="234" /></a></p>
<p><a href="http://www.jasonsamuel.com/wp-content/uploads/2010/01/5.gif"><img class="alignnone size-medium wp-image-312" title="5" src="http://www.jasonsamuel.com/wp-content/uploads/2010/01/5-300x234.gif" alt="" width="300" height="234" /></a> <a href="http://www.jasonsamuel.com/wp-content/uploads/2010/01/6.gif"><img class="alignnone size-medium wp-image-313" title="6" src="http://www.jasonsamuel.com/wp-content/uploads/2010/01/6-300x234.gif" alt="" width="300" height="234" /></a></p>
<p><a href="http://www.jasonsamuel.com/wp-content/uploads/2010/01/7.gif"><img class="alignnone size-medium wp-image-314" title="7" src="http://www.jasonsamuel.com/wp-content/uploads/2010/01/7-300x234.gif" alt="" width="300" height="234" /></a></p>
<p>4. Install the .cer in IIS using the Web Server Certificate Wizard where you originally generated the CSR.  Just process the pending request to install it.</p>
<p>5. View the cert in IIS and export it with the private key in pkcs12 (.pfx) format.  Just set the password as “password” since you will be deleting it after conversion is complete later.</p>
<p>6. Go to the directory where OpenSSL.exe is and type in the following to convert the .pfx to a .pem</p>
<blockquote><p><strong>openssl pkcs12 -in nameofcert.pfx -out nameofcert.pem</strong></p></blockquote>
<p>7. Type the “password” when prompted for the pass phrase.</p>
<p>8. Install the .pem on the appliance and it should work</p>
<p><strong><span style="color: #ff0000;">IMPORTANT NOTE:</span></strong></p>
<p>If you are doing it for some appliances like a Cisco IronPort, you need to add the nodes switch when creating the .pem:</p>
<blockquote><p><strong>openssl pkcs12 -in nameofcert.pfx -out nameofcert.pem –nodes</strong></p></blockquote>
<p>The –nodes switch ensures that the key inside the .pem is left unencrypted.  If you attempt to install a .pem created without the -nodes switch, the appliance will take the cert but will not accept the private key since it cannot read it in an encrypted state.</p>
<p><a href="http://www.jasonsamuel.com/2010/01/07/how-to-convert-an-ssl-cert-to-a-pem-for-installation-on-citrix-and-cisco-appliances/">How to convert an SSL cert to a .pem for installation on Citrix and Cisco appliances</a> is a post from: <a href="http://www.jasonsamuel.com">JasonSamuel.com</a></p>


<p>More of my posts you might like:<ol><li><a href='http://www.jasonsamuel.com/2009/03/12/ssl-certificate-chains-explained/' rel='bookmark' title='Permanent Link: SSL certificate chains explained'>SSL certificate chains explained</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.jasonsamuel.com/2010/01/07/how-to-convert-an-ssl-cert-to-a-pem-for-installation-on-citrix-and-cisco-appliances/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/


Served from: www.jasonsamuel.com @ 2010-07-31 19:52:25 -->