<?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>ClusterFunk</title>
	<atom:link href="http://www.clusterfunk.co.uk/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.clusterfunk.co.uk</link>
	<description>Stuff I do with Zeus, Microsoft and Virtualisation. Oh and I can&#039;t spell ;)</description>
	<lastBuildDate>Mon, 14 Dec 2009 00:18:55 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Rate shaping Traffic with Zeus ZTM v6</title>
		<link>http://www.clusterfunk.co.uk/rate-shaping-traffic-with-zeus-ztm-v6/</link>
		<comments>http://www.clusterfunk.co.uk/rate-shaping-traffic-with-zeus-ztm-v6/#comments</comments>
		<pubDate>Sun, 13 Dec 2009 06:00:00 +0000</pubDate>
		<dc:creator>Antony Joyce</dc:creator>
				<category><![CDATA[Networking]]></category>
		<category><![CDATA[Zeus ZTM]]></category>
		<category><![CDATA[Zeus ZXTM]]></category>

		<guid isPermaLink="false">http://www.clusterfunk.co.uk/rate-shaping-traffic-with-zeus-ztm-v6/</guid>
		<description><![CDATA[ A couple of weeks ago I built out a rate shaping solution for a client hosting a web site that is very, very, very popular at the moment. Largely because the nation is gripped by the antics of the likes of John and Edward and the fascinated by Jordan/Katie Price’s bikini selections and swimming/caving [...]]]></description>
			<content:encoded><![CDATA[<p align="justify"><a href="http://www.clusterfunk.co.uk/wp-content/uploads/2009/12/image.png"><img style="border-right-width: 0px; margin: 0px 0px 0px 10px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" align="right" src="http://www.clusterfunk.co.uk/wp-content/uploads/2009/12/image_thumb.png" width="98" height="34" /></a> A couple of weeks ago I built out a rate shaping solution for a client hosting a web site that is very, very, very popular at the moment. Largely because the nation is gripped by the antics of the likes of John and Edward and the fascinated by Jordan/Katie Price’s bikini selections and swimming/caving capabilities.</p>
<p>So what is this rate shaping all about?&#160; Well for a kick off it is in fact simplicity itself to implement using Zeus ZTM v6 (or indeed previous ZXTM versions) SLM capabilities.</p>
<p><strong>Solution Components </strong></p>
<p><a href="http://www.clusterfunk.co.uk/wp-content/uploads/2009/12/image1.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; margin-left: 0px; border-left-width: 0px; margin-right: 0px" title="image" border="0" alt="image" align="right" src="http://www.clusterfunk.co.uk/wp-content/uploads/2009/12/image_thumb1.png" width="187" height="222" /></a>ZTM provides two technologies that are useful to in service monitoring/protection. The first is the SLM class and the second is the Rate class.</p>
<p><strong>SLM</strong>&#160; <strong>Class</strong></p>
<p>An SLM or Service Level Monitoring class is a mechanism for monitoring the response times of the site/service you provide. The SLM class provides the facility through TrafficScript to report on the percentage of requests that confirms to the threshold configured in the SLM class that the response arrives back within&#160; </p>
<p><strong>Rate Class</strong> </p>
<p>The Rate Class is like a pipe with a definable capacity down which requests against your service flow. The pipe can only allow its maximum capacity and no more. The Rate Class (via TrafficScript) provides a overflow queue (lets think of it as a bucket catching the excess flow that isn’t getting through the pipe) that can be processed once requests have dropped below maximum capacity. </p>
<p><strong>Put it all together: Step by Step</strong></p>
<p>So lets set up a service that uses SLM and Rate Shaping.</p>
<p>I’m using the ZTM r6.02 virtual Appliance on my home lab and built this config as I wrote this blog (its that intuitive <img src='http://www.clusterfunk.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  ) </p>
<p><a href="http://www.clusterfunk.co.uk/wp-content/uploads/2009/12/image2.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.clusterfunk.co.uk/wp-content/uploads/2009/12/image_thumb2.png" width="381" height="105" /></a> </p>
<p><strong>Create a Virtual Service</strong> </p>
<p>I’ve created one called “HTTP Service”</p>
<p><a href="http://www.clusterfunk.co.uk/wp-content/uploads/2009/12/image3.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.clusterfunk.co.uk/wp-content/uploads/2009/12/image_thumb3.png" width="244" height="111" /></a> </p>
<p>and a Pool called “HTTP Servers” </p>
<p>for the purpose of this post I have used Google to provide the web servers by simply adding the node www.google.com:80 </p>
<p><a href="http://www.clusterfunk.co.uk/wp-content/uploads/2009/12/image4.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.clusterfunk.co.uk/wp-content/uploads/2009/12/image_thumb4.png" width="244" height="228" /></a> </p>
<p><strong>Set Up a SLM</strong> </p>
<p>Click catalogue and then SLM tab </p>
<p><a href="http://www.clusterfunk.co.uk/wp-content/uploads/2009/12/image5.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.clusterfunk.co.uk/wp-content/uploads/2009/12/image_thumb5.png" width="415" height="204" /></a>&#160;&#160; </p>
<p>In this case I have called the Class “Subscription”</p>
<p>The SLM class offers several values to modify but I am only interested in the millisecond response time as I am going to use TrafficScript to test the other values. </p>
<p><a href="http://www.clusterfunk.co.uk/wp-content/uploads/2009/12/image6.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.clusterfunk.co.uk/wp-content/uploads/2009/12/image_thumb6.png" width="244" height="189" /></a> </p>
<p>That’s the SLM class created <img src='http://www.clusterfunk.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  </p>
<p>Now apply it to the Virtual Service </p>
<p><a href="http://www.clusterfunk.co.uk/wp-content/uploads/2009/12/image7.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.clusterfunk.co.uk/wp-content/uploads/2009/12/image_thumb7.png" width="450" height="78" /></a>&#160;&#160; </p>
<p>Click Edit next to the Classes tab in the “HTTP Service” Virtual Service configuration summery.</p>
<p><a href="http://www.clusterfunk.co.uk/wp-content/uploads/2009/12/image8.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.clusterfunk.co.uk/wp-content/uploads/2009/12/image_thumb8.png" width="244" height="80" /></a> </p>
<p>select Subscription and click update</p>
<p>&#160;</p>
<p>The Virtual service is now been monitored against the response_time value set in the SLM Class. In this case 40 milliseconds.&#160; </p>
<p>Now we need to check the value and do something with it. </p>
<p><strong>Rate Class</strong> </p>
<p>From the Catalogue tab select Rate and create a new Rate Class </p>
<p><a href="http://www.clusterfunk.co.uk/wp-content/uploads/2009/12/image9.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.clusterfunk.co.uk/wp-content/uploads/2009/12/image_thumb9.png" width="244" height="117" /></a> </p>
<p>I’ve called mine “Premium” you can have many rate classes and as is typical with ZTM the value used to determine which class to apply are numerous and highly configurable via TrafficScript.&#160; E.G. it could be the host name, referrer, GeoIP check, username, cookie value etc etc etc that determines which class to apply.&#160;&#160; </p>
<p>The values to configure in a rate class are simple and represent a volume of requests that your service can handle measured in requests per second and requests per minute. There are two values so that you can provide a quantification of what is sustainable by your service. If for example we could only configure 10,000 requests per minute in theory these could be delivered in the first ten seconds leaving 50 seconds where the rate class will not allow any additional connections. </p>
<p><a href="http://www.clusterfunk.co.uk/wp-content/uploads/2009/12/image10.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.clusterfunk.co.uk/wp-content/uploads/2009/12/image_thumb10.png" width="244" height="160" /></a> </p>
<p><strong>Putting it all together</strong> </p>
<p><strong>TrafficScript: </strong></p>
<p>You need to do something if your service incredibly popular.</p>
<p><a href="http://www.clusterfunk.co.uk/wp-content/uploads/2009/12/image11.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.clusterfunk.co.uk/wp-content/uploads/2009/12/image_thumb11.png" width="458" height="112" /></a> </p>
<p>This TrafficScript checks if the service is conforming to our agreed SLA (Service Level Agreement) This is for you to decide what is acceptable. In this example its 95% of transactions been completed within the millisecond response time configured in the SLM Class “Subscription”. If our service drops below 95% the Rate Class is utilised to limit the number of connections that the service will handle.&#160; This is a simple TrafficScript that achieves this: </p>
<p><a href="http://www.clusterfunk.co.uk/wp-content/uploads/2009/12/image12.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.clusterfunk.co.uk/wp-content/uploads/2009/12/image_thumb12.png" width="455" height="211" /></a>&#160;</p>
<p><font color="#0000ff">connection.setServiceLevelClass( &quot;Subscription&quot; );      <br />$conforming = slm.conforming( &quot;Subscription&quot; );</font></p>
<p><font color="#0000ff">log.info(&quot;Percentage Conforming is : &quot;. $conforming);</font></p>
<p><font color="#0000ff"><font color="#8080c0"># Test our SLM threshold. If response times are degrading        <br /># apply rate shaping class to protect service</font> </font></p>
<p><font color="#0000ff">if( $conforming &lt; 95 ) {      <br />rate.use(&quot;Premium&quot;);       <br />}</font></p>
<p><a href="http://www.clusterfunk.co.uk/wp-content/uploads/2009/12/image13.png"><img style="border-right-width: 0px; margin: 0px 0px 0px 15px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" align="right" src="http://www.clusterfunk.co.uk/wp-content/uploads/2009/12/image_thumb13.png" width="168" height="135" /></a>The Rate Class is applied while the SLM Class detects that the service is performing below 95% conforming (to the configured 40 millisecond response). </p>
<p>The Rate Class limits the number of connections that will be processed and also provides a mechanism for queuing excess connection attempts. This queue will be held until the level of activity drops below the per second threshold OR the TCP connection times out (which is bad for user experience if left unhandled). </p>
<p>To handle the excess traffic a second TrafficScript is required to manage this:</p>
<p><a href="http://www.clusterfunk.co.uk/wp-content/uploads/2009/12/image14.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.clusterfunk.co.uk/wp-content/uploads/2009/12/image_thumb14.png" width="457" height="129" /></a> </p>
<p><font color="#0000ff"><font color="#8080c0"># How many queued requests are allowed before we track users.        <br /></font>$shapeQueue = 10;       <br />$backlog = rate.getbacklog(&quot;Premium&quot;);       <br />if ( $backlog &gt; $shapeQueue )       <br />{       <br />http.sendResponse( 503, &quot;text/html&quot;, resource.get( &quot;busy.html&quot;), &quot;&quot; );       <br />}</font></p>
<p>This script sets a value as an acceptable queue length( $shapeQueue ). While the Rate Class is applied, each request is checked to see if the number of connections in the queue is greater than the desired maximum queue length. </p>
<p align="justify">If it is then we can handle the connection in a number of ways. In this example I have configured the ZTMs to server a busy page and importantly used the <em>HTTP</em> Error <em>503</em> &#8211; Service unavailable in the response. The reason I have configure this is to prevent upstream servers from caching this response.&#160;&#160;&#160;&#160; </p>
<p><strong>Testing the configuration</strong></p>
<p>The key to a successful deployment is making sure that millisecond response value is realistic and the number of connections configured in the Rate Class accurately reflect the threshold that the service can deliver – a small margin of error.&#160; </p>
<p>In many cases this can be difficult to establish without sufficiently complex load testing. If you have a very module architecture with well established performance characteristics then simply plug in the values and go home for the weekend safe in the knowledge that everything is well with the world.&#160; </p>
<p>If you are not so luck there is a nice way to monitor in real-time performance activity of your service in relation to the SLM and Rate Class configuration. </p>
<p>Example Interactive </p>
<p><a href="http://www.clusterfunk.co.uk/wp-content/uploads/2009/12/image15.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.clusterfunk.co.uk/wp-content/uploads/2009/12/image_thumb15.png" width="244" height="194" /></a> </p>
<p>I use Apache JMeter to create load. And that&#8217;s my next blog article <img src='http://www.clusterfunk.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> &#160; </p>
<p><a href="http://www.clusterfunk.co.uk/wp-content/uploads/2009/12/image16.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.clusterfunk.co.uk/wp-content/uploads/2009/12/image_thumb16.png" width="244" height="143" /></a> </p>
<p>and use the ZTM current activity monitors</p>
<p><a href="http://www.clusterfunk.co.uk/wp-content/uploads/2009/12/image17.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.clusterfunk.co.uk/wp-content/uploads/2009/12/image_thumb17.png" width="387" height="117" /></a>&#160;</p>
<p>To get real-time feedback.</p>
<p><a href="http://www.clusterfunk.co.uk/wp-content/uploads/2009/12/image18.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.clusterfunk.co.uk/wp-content/uploads/2009/12/image_thumb18.png" width="282" height="297" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.clusterfunk.co.uk/rate-shaping-traffic-with-zeus-ztm-v6/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Zeus release ZTM v6.0</title>
		<link>http://www.clusterfunk.co.uk/zeus-release-ztm-v6-0/</link>
		<comments>http://www.clusterfunk.co.uk/zeus-release-ztm-v6-0/#comments</comments>
		<pubDate>Tue, 20 Oct 2009 12:34:13 +0000</pubDate>
		<dc:creator>Antony Joyce</dc:creator>
				<category><![CDATA[Industry]]></category>
		<category><![CDATA[Zeus ZXTM]]></category>

		<guid isPermaLink="false">http://www.clusterfunk.co.uk/zeus-release-ztm-v6-0/</guid>
		<description><![CDATA[
Its been a long time since I posted mainly because all of the work I have been doing is covered by NDA (no disclosure agreements). One of the secret squirrel pieces of work involved Zeus ZXTM r5.2 beta testing. Well the good people of Zeus must have been having more moments of genius that usual [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.clusterfunk.co.uk/wp-content/uploads/2009/10/image.png"><img title="image" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; margin-left: 0px; margin-right: 0px; border-right-width: 0px" height="85" alt="image" src="http://www.clusterfunk.co.uk/wp-content/uploads/2009/10/image_thumb.png" width="240" align="right" border="0" /></a></p>
<p>Its been a long time since I posted mainly because all of the work I have been doing is covered by NDA (no disclosure agreements). One of the secret squirrel pieces of work involved Zeus ZXTM r5.2 beta testing. Well the good people of Zeus must have been having more moments of genius that usual and have decided that the great features due for release in <a href="http://www.clusterfunk.co.uk/zxtm-52-rule-enhancement-exclusive/" target="_blank">r5.2 beta</a> were not enough! So they have pulled out all the stops and are releasing v6.0 now known simply as ZTM (Zeus Traffic Manager).</p>
<p>This is a huge improvement over v5.1 with true load balancing of single IP, via a nifty loopback interface which can move between ZTM’s (That’s going to take some getting used to). Other changes include SSD backed cache, UI enhancements, enhanced support for cloud deployment (such as Amazon EC2) and extending TrafficScript functionality to name but a few.</p>
<p>Zeus are delivering a presentation where I work next week, I’ll be sure to post following this with more in depth information.</p>
<p>In the meantime here’s further reading</p>
<p><a href="http://knowledgehub.zeus.com/news/2009/10/20/zeus_traffic_manager_6_0_released">http://knowledgehub.zeus.com/news/2009/10/20/zeus_traffic_manager_6_0_released</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.clusterfunk.co.uk/zeus-release-ztm-v6-0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ZXTM Plug-in for eclipse</title>
		<link>http://www.clusterfunk.co.uk/zxtm-plug-in-for-eclipse/</link>
		<comments>http://www.clusterfunk.co.uk/zxtm-plug-in-for-eclipse/#comments</comments>
		<pubDate>Thu, 09 Jul 2009 10:11:40 +0000</pubDate>
		<dc:creator>Antony Joyce</dc:creator>
				<category><![CDATA[Zeus ZXTM]]></category>

		<guid isPermaLink="false">http://www.clusterfunk.co.uk/zxtm-plug-in-for-eclipse/</guid>
		<description><![CDATA[ 
Just a quick post to draw your attention to the excellent plug-in for eclipse IDE.   This is fantastic. You can now edit Traffic Script in a nice IDE (like a real developer   ) and avoid having to spawn loads of browser windows to check traffic Script reference etc.
Deployment   [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.clusterfunk.co.uk/wp-content/uploads/2009/07/image.png"><img title="image" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="65" alt="image" src="http://www.clusterfunk.co.uk/wp-content/uploads/2009/07/image_thumb.png" width="244" border="0" /></a> </p>
<p>Just a quick post to draw your attention to the excellent plug-in for eclipse IDE.   <br />This is fantastic. You can now edit Traffic Script in a nice IDE (like a real developer <img src='http://www.clusterfunk.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  ) and avoid having to spawn loads of browser windows to check traffic Script reference etc.</p>
<p><strong>Deployment     <br /></strong>Simplicity itself. You point the eclipse development environment at your ZXTM cluster (or clusters you can manage multiple environments) and the Plug-in provides the functionality that you have in the ZXTM Traffic Script GUI and then some!&#160; </p>
<p><em>Context sensitive object browser</em> </p>
<p><a href="http://www.clusterfunk.co.uk/wp-content/uploads/2009/07/image1.png"><img title="image" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="173" alt="image" src="http://www.clusterfunk.co.uk/wp-content/uploads/2009/07/image_thumb1.png" width="439" border="0" /></a> </p>
<p><strong>Zeus Knowledge Hub</strong>     <br />More detail about the workings of the Plug-in here    <br /><a title="http://www.zeus.com/documents/en/ZX/ZXTM_Plugin_for_Eclipse.pdf" href="http://www.zeus.com/documents/en/ZX/ZXTM_Plugin_for_Eclipse.pdf" target="_blank">http://www.zeus.com/documents/en/ZX/ZXTM_Plugin_for_Eclipse.pdf</a></p>
<p>and the Setup walkthrough here   <br /><a title="http://www.zeus.com/documents/en/ZX/ZXTM_Plugin_for_Eclipse_walkthrough.pdf" href="http://www.zeus.com/documents/en/ZX/ZXTM_Plugin_for_Eclipse_walkthrough.pdf" target="_blank">http://www.zeus.com/documents/en/ZX/ZXTM_Plugin_for_Eclipse_walkthrough.pdf</a></p>
<p><a href="http://www.clusterfunk.co.uk/wp-content/uploads/2009/07/image2.png"><img title="image" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="42" alt="image" src="http://www.clusterfunk.co.uk/wp-content/uploads/2009/07/image_thumb2.png" width="298" border="0" /></a> </p>
<p>You can download eclipse here </p>
<p><a title="http://www.eclipse.org/downloads/" href="http://www.eclipse.org/downloads/" target="_blank">http://www.eclipse.org/downloads/</a></p>
<p>This is the link you need for Windows</p>
<p><a title="http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/galileo/R/eclipse-java-galileo-win32.zip" href="http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/galileo/R/eclipse-java-galileo-win32.zip" target="_blank">http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/galileo/R/eclipse-java-galileo-win32.zip</a></p>
<p>Zeus. – Why wait indeed …..</p>
<p> <img src='http://www.clusterfunk.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.clusterfunk.co.uk/zxtm-plug-in-for-eclipse/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ZXTM 5.2 Rule enhancement exclusive</title>
		<link>http://www.clusterfunk.co.uk/zxtm-52-rule-enhancement-exclusive/</link>
		<comments>http://www.clusterfunk.co.uk/zxtm-52-rule-enhancement-exclusive/#comments</comments>
		<pubDate>Tue, 30 Jun 2009 11:51:00 +0000</pubDate>
		<dc:creator>Antony Joyce</dc:creator>
				<category><![CDATA[Zeus ZXTM]]></category>

		<guid isPermaLink="false">http://www.clusterfunk.co.uk/zxtm-52-rule-enhancement-exclusive/</guid>
		<description><![CDATA[ Several weeks ago I submitted a number of feature/enhancement requests to Zeus in relation to ZXTM usability. One of which relates to the management of rules assigned to a virtual server. The good people at Zeus contacted me regarding my submission and they have allowed me a “world exclusive” !   
This post [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.clusterfunk.co.uk/wp-content/uploads/2009/06/image8.png"><img title="image" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="56" alt="image" src="http://www.clusterfunk.co.uk/wp-content/uploads/2009/06/image-thumb8.png" width="163" border="0" /></a> Several weeks ago I submitted a number of feature/enhancement requests to Zeus in relation to ZXTM usability. One of which relates to the management of rules assigned to a virtual server. The good people at Zeus contacted me regarding my submission and they have allowed me a “<strong>world exclusive</strong>” ! <img src='http://www.clusterfunk.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  </p>
<p>This post gives you a sneak preview of one of the enhancements that is due for release in ZXTM version 5.2 </p>
<p><strong>Rules prior to and including&#160; ZXTM r5.1</strong>&#160; </p>
<p>In the current release of ZXTM rules are managed with the order that the rules are processed been defined by moving them up or down in relation to their neighbour. The top rule is processed first working down the list from top to bottom. </p>
<p><a href="http://www.clusterfunk.co.uk/wp-content/uploads/2009/06/image.png"><img title="image" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="69" alt="image" src="http://www.clusterfunk.co.uk/wp-content/uploads/2009/06/image-thumb.png" width="356" border="0" /></a> </p>
<p>This is fine for a few rules but once you have more than eight or nine rules on a virtual server the interface is a pain to manage.</p>
<p><strong>ZXTM 5.2 Rules Sneak Preview </strong></p>
<p>In the forthcoming release the rules section has been given an overhaul and now features the ability to drag and drop the rule into the position you want it. This will be very useful and speed up deployment of new rules. </p>
<p><a href="http://www.clusterfunk.co.uk/wp-content/uploads/2009/06/image1.png"><img title="image" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="164" alt="image" src="http://www.clusterfunk.co.uk/wp-content/uploads/2009/06/image-thumb1.png" width="389" border="0" /></a> </p>
<p>Each rule has a little tab next to </p>
<p><a href="http://www.clusterfunk.co.uk/wp-content/uploads/2009/06/image2.png"><img title="image" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="126" alt="image" src="http://www.clusterfunk.co.uk/wp-content/uploads/2009/06/image-thumb2.png" width="123" border="0" /></a> </p>
<p>Click on the tab </p>
<p><a href="http://www.clusterfunk.co.uk/wp-content/uploads/2009/06/image3.png"><img title="image" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="54" alt="image" src="http://www.clusterfunk.co.uk/wp-content/uploads/2009/06/image-thumb3.png" width="115" border="0" /></a></p>
<p> and the cursor changes to a cross </p>
<p><a href="http://www.clusterfunk.co.uk/wp-content/uploads/2009/06/image4.png"><img title="image" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="38" alt="image" src="http://www.clusterfunk.co.uk/wp-content/uploads/2009/06/image-thumb4.png" width="117" border="0" /></a> </p>
<p>&#160;</p>
<p>These screenshots show rule B moving from the bottom of the list to the top. </p>
<p><a href="http://www.clusterfunk.co.uk/wp-content/uploads/2009/06/image5.png"><img title="image" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="152" alt="image" src="http://www.clusterfunk.co.uk/wp-content/uploads/2009/06/image-thumb5.png" width="175" border="0" /></a> </p>
<p><a href="http://www.clusterfunk.co.uk/wp-content/uploads/2009/06/image6.png"><img title="image" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="161" alt="image" src="http://www.clusterfunk.co.uk/wp-content/uploads/2009/06/image-thumb6.png" width="192" border="0" /></a> </p>
<p><a href="http://www.clusterfunk.co.uk/wp-content/uploads/2009/06/image7.png"><img title="image" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="135" alt="image" src="http://www.clusterfunk.co.uk/wp-content/uploads/2009/06/image-thumb7.png" width="152" border="0" /></a> </p>
<p><strong>Video </strong></p>
<p>You can view a video that demonstrates the new rules system in action <a href="http://www.screencast.com/t/R42QKoqRp" target="_blank">here</a></p>
<p><strong>Valued</strong></p>
<p>It is fantastic to be able to feedback to Zeus and see the results so quickly. </p>
<p>I can assure you that your feedback, observations and enhancement requests are greatly appreciated. The development team will evaluate the request for feasibility. You could have your request implemented in a subsequent release.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.clusterfunk.co.uk/zxtm-52-rule-enhancement-exclusive/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Installing ZXTM beyond ./zinstall</title>
		<link>http://www.clusterfunk.co.uk/installing-zxtm-beyond-zinstall/</link>
		<comments>http://www.clusterfunk.co.uk/installing-zxtm-beyond-zinstall/#comments</comments>
		<pubDate>Wed, 24 Jun 2009 17:00:00 +0000</pubDate>
		<dc:creator>Antony Joyce</dc:creator>
				<category><![CDATA[Tool, Tips and Tricks]]></category>
		<category><![CDATA[Zeus ZXTM]]></category>

		<guid isPermaLink="false">http://www.clusterfunk.co.uk/installing-zxtm-beyond-zinstall/</guid>
		<description><![CDATA[This post is aimed at covering the stuff required to deploy ZXTMs that isn’t actually the ZXTM install itself. Tasks such as OS configuration, firewall, user accounts etc. If your a Linux admin you already know this stuff but you may find it useful as a checklist.&#160; 
This post relates to RHEL 5.x 
After you [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.clusterfunk.co.uk/wp-content/uploads/2009/05/image7.png"><img title="image" style="display: inline; margin: 0px" height="56" alt="image" src="http://www.clusterfunk.co.uk/wp-content/uploads/2009/05/image-thumb7.png" width="163" align="right" border="0" /></a>This post is aimed at covering the stuff required to deploy ZXTMs that isn’t actually the ZXTM install itself. Tasks such as OS configuration, firewall, user accounts etc. If your a Linux admin you already know this stuff but you may find it useful as a checklist.&#160; </p>
<p>This post relates to RHEL 5.x </p>
<p>After you install the OS</p>
<p><u>Set up user accounts </u></p>
<p>useradd <i>username      <br /></i>passwd <i>password</i></p>
<p>I create an account called remote that I can us to login via SSH<em>.</em></p>
<p><u>Network</u></p>
<p>Set up networks to provide access to internet </p>
<p>For example here is my VM config ( /etc/sysconfig/network-scripts/ifcfg-eth0 file for eth0 network interface:)&#160; use nano or vi to edit this as required.&#160; </p>
<p>DEVICE=eth0    <br />BOOTPROTO=static     <br />BROADCAST=192.168.1.255     <br />HWADDR=00:0F:EA:91:04:07     <br />IPADDR=192.168.1.111     <br />NETMASK=255.255.255.0     <br />NETWORK=192.168.1.0     <br />ONBOOT=yes     <br />TYPE=Ethernet</p>
<p><strong>Static routes:</strong></p>
<p>You would put your default gateway in “/etc/sysconfig/network” using “GATEWAY=x.x.x.x”</p>
<p>You would typically add static routes into a startup file the system will read on boot e.g.</p>
<p>/etc/sysconfig/network-scripts/route-eth0</p>
<p>#Route Description</p>
<p>10.8.0.0/24 via 10.0.0.1 dev eth0</p>
<p>Once configured you can get the system to re-read the files as follows:</p>
<p>“service network restart” (redhat specific)</p>
<p>Or</p>
<p>“/etc/init.d/network restart” (Works with just about any Unix box)</p>
<p>&#160;</p>
<p><u>RHEL 5 Registration </u></p>
<p><em>rhn_register</em> </p>
<p>Follow onscreen dialogue to register RHEL – You obviously need to have purchased a subscription.</p>
<p><a href="http://www.clusterfunk.co.uk/wp-content/uploads/2009/06/clip-image002.jpg"><img title="clip_image002" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="155" alt="clip_image002" src="http://www.clusterfunk.co.uk/wp-content/uploads/2009/06/clip-image002-thumb.jpg" width="244" border="0" /></a></p>
<p><u>Install Java </u></p>
<p><em>yum install java</em> </p>
<p>its that easy <img src='http://www.clusterfunk.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  </p>
<p><a href="http://www.clusterfunk.co.uk/wp-content/uploads/2009/06/clip-image004.jpg"><img title="clip_image004" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="157" alt="clip_image004" src="http://www.clusterfunk.co.uk/wp-content/uploads/2009/06/clip-image004-thumb.jpg" width="244" border="0" /></a></p>
<p><a href="http://www.clusterfunk.co.uk/wp-content/uploads/2009/06/clip-image006.jpg"><img title="clip_image006" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="155" alt="clip_image006" src="http://www.clusterfunk.co.uk/wp-content/uploads/2009/06/clip-image006-thumb.jpg" width="244" border="0" /></a></p>
<p><u>General OS Update </u></p>
<p>To update RHEL simply type <em>Yum update</em> </p>
<p><u>ZXTM pre Install</u></p>
<p>This section assumes that you are doing the install remotely from Windows machine. You must have port 22 access through any firewalls between zxtm and remote console.</p>
<p>Download following utils</p>
<p>winscp <a href="http://winscp.net/eng/download.php">http://winscp.net/eng/download.php</a></p>
<p>putty <a href="http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html">http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html</a></p>
<p>Use winscp to upload ZXTM.tar file to <em>/home/remote</em></p>
<p>Use putty to SSH to host as remote </p>
<p>Then sudo to root </p>
<p><a href="http://www.clusterfunk.co.uk/wp-content/uploads/2009/06/clip-image008.jpg"><img title="clip_image008" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="155" alt="clip_image008" src="http://www.clusterfunk.co.uk/wp-content/uploads/2009/06/clip-image008-thumb.jpg" width="244" border="0" /></a></p>
<p>Untar the zxtm install file </p>
<p>Tar –zxf /home/remote/ZXTM_51r1_Linux-x86.tgz</p>
<p>This creates a folder called ZXTM_51r1_Linux-x86</p>
<p>Navigate to the folder it contains zinstall</p>
<p>Type ./zinstall</p>
<p><a href="http://www.clusterfunk.co.uk/wp-content/uploads/2009/06/clip-image010.jpg"><img title="clip_image010" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="155" alt="clip_image010" src="http://www.clusterfunk.co.uk/wp-content/uploads/2009/06/clip-image010-thumb.jpg" width="244" border="0" /></a></p>
<p>Once the install is completed you may need to configure the firewall (iptables) to allow access to the administration port.</p>
<p><u>RHEL Firewall</u></p>
<p>iptables – open ports required for administration</p>
<p>e.g. this command allows access to ZXTM default admin ports from 192.168.1.1</p>
<p><em>iptable –A INPUT –d 192.168.1.1 –p –tcp –m tcp –dport 9080:9090 –j ACCEPT</em></p>
<p>/etc/init.d/iptables save </p>
<p>List command allows inbound connections on 9090</p>
<p><em>iptables –A INPUT –p tcp –m tcp –dport 9090 –j ACCEPT</em></p>
<p>Obvious but if you are installing ZXTMs into existing platform consider the infrastructure such as firewalls and routers. You may require static routes on the ZXTM “internal” interfaces to route to you web servers. Other consideration is to make sure that the ZXTM interfaces can ping the gateway address set in the network configuration. </p>
<p>Useful ports to open on any firewall/s in related infrastructure. You may also need to configure iptable on zxtm hosts as well.</p>
<p>SNMP (161) – to infrastructure server (monitoring).</p>
<p>SSH (port 22) – between administrative console &amp; infrastructure server (back up).</p>
<p>RADIUS (1812) – to Radius server if required </p>
<p>HTTP (80) – to all relevant servers via internal interface and to external to internet/network that the clients come from <img src='http://www.clusterfunk.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  </p>
<p>HTTPS (443) – to all relevant servers via internal interface and if providing SSL passthru to external to internet/network that the clients come from <img src='http://www.clusterfunk.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> &#160;&#160; </p>
<p>DNS (53)</p>
<p>&#160;</p>
<p><u>ZXTM specific OS</u></p>
<p>Areas of the OS to be familiar with from a ZXTM configuration perspective (assumes Redhat RHEL)</p>
<p><strong>Zeus Install directory</strong> </p>
<p><em>/usr/local/zeus/zxtm/</em> </p>
<p><strong>Logs:</strong></p>
<p><em>/usr/local/zeus/zxtm/log/</em></p>
<p>They include </p>
<p>errors – this is were log.info() output is logged </p>
<p>audit – Log shows security/change activity viewed via Diagnose/Audit Log</p>
<p><a href="http://www.clusterfunk.co.uk/wp-content/uploads/2009/06/audit.jpg"><img title="audit" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="244" alt="audit" src="http://www.clusterfunk.co.uk/wp-content/uploads/2009/06/audit-thumb.jpg" width="204" border="0" /></a> </p>
<p>Plus any logs that you have created for virtual servers (Activity/View Logs/Virtual Server Request Logging)</p>
<p><strong>Extra Files</strong></p>
<p>This is were extra files live such as IP white list or html assets that you want to have served by the ZXTM in the event of loss of connectivity to or outage of web servers. </p>
<p><em>/usr/local/zeus/zxtm/conf/extra</em></p>
<p><em><a href="http://www.clusterfunk.co.uk/wp-content/uploads/2009/06/extrafiles.jpg"><img title="extrafiles" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="116" alt="extrafiles" src="http://www.clusterfunk.co.uk/wp-content/uploads/2009/06/extrafiles-thumb.jpg" width="376" border="0" /></a>&#160;</em></p>
<p><strong>Config Script</strong> </p>
<p>If you need to make changes to core ZXTM install the config script is located in </p>
<p><em>/usr/local/zeus/zxtm/</em></p>
<p>to execute type <em> ./configure</em></p>
<p><em><a href="http://www.clusterfunk.co.uk/wp-content/uploads/2009/06/configure.jpg"><img title="configure" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="130" alt="configure" src="http://www.clusterfunk.co.uk/wp-content/uploads/2009/06/configure-thumb.jpg" width="244" border="0" /></a>&#160;</em></p>
<p><strong>Debugging </strong></p>
<p>To view logs in real time for <a href="http://www.clusterfunk.co.uk/traffic-script-debug-tip/" target="_blank">debugging</a> </p>
<p>tail –f /usr/local/zeus/zxtm/log/errors</p>
<p>Hope this is useful <img src='http://www.clusterfunk.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  </p>
]]></content:encoded>
			<wfw:commentRss>http://www.clusterfunk.co.uk/installing-zxtm-beyond-zinstall/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ZXTM HTTP Redirects with Traffic Script</title>
		<link>http://www.clusterfunk.co.uk/zxtm-http-redirects-with-traffic-script/</link>
		<comments>http://www.clusterfunk.co.uk/zxtm-http-redirects-with-traffic-script/#comments</comments>
		<pubDate>Mon, 08 Jun 2009 22:42:00 +0000</pubDate>
		<dc:creator>Antony Joyce</dc:creator>
				<category><![CDATA[Tool, Tips and Tricks]]></category>
		<category><![CDATA[Zeus ZXTM]]></category>

		<guid isPermaLink="false">http://www.clusterfunk.co.uk/zxtm-http-redirects-with-traffic-script/</guid>
		<description><![CDATA[
If like me you have spent most of you IT life working with a Windows environment you have never really had to consider the case that you write scripts in. The odd login script or batch file aside its not the mainstay of the work concentrates on GUI environments.
While working on a particular task recently [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.clusterfunk.co.uk/wp-content/uploads/2009/05/image9.png"><img style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" title="image" src="http://www.clusterfunk.co.uk/wp-content/uploads/2009/05/image-thumb9.png" border="0" alt="image" width="163" height="56" /></a></p>
<p>If like me you have spent most of you IT life working with a Windows environment you have never really had to consider the case that you write scripts in. The odd login script or batch file aside its not the mainstay of the work concentrates on GUI environments.</p>
<p>While working on a particular task recently I spotted this little issue with issuing a 302 redirect with traffic script.</p>
<p>Linux is case sensitive so login.aspx is not the same as lOgin.aspx</p>
<p>To this end its important that you consider case If you are using ZXTMs to terminate SSL and restrict access to resources served from a none Linux based web servers.</p>
<p>e.g.</p>
<p>This script looks for any URL containing login.aspx, signup.aspx, /thismustbessl/userdetailseform.aspx, /admin/ for the website <a href="http://www.website.net">www.website.net</a>.</p>
<p>$url = http.getRawURL();<br />
$host = http.getHeader (&#8220;host&#8221;);</p>
<p>if (($host == &#8220;<a href="http://www.website.net">www.website.net</a>&#8220;) &amp;&amp; (string.contains($url, &#8220;Login.aspx&#8221;)) || (string.contains($url, &#8220;Signup.aspx&#8221;)) ||</p>
<p>(string.contains($url, &#8220;/ThisMustBeSSL/userdetailseform.aspx&#8221;)) || (string.contains($url, &#8220;/admin/&#8221;))) {</p>
<p>http.sendResponse( &#8220;301 Moved Permanently&#8221;, &#8220;text/html&#8221;, &#8220;&#8221;, &#8220;Location: <a href="https://">https://&#8221;.$host</a> . $url);<br />
}</p>
<p>So this script does what we need right? Wrong</p>
<p>If you request <a href="http://www.website.net/ThisMustBeSSL/userdetailseform.aspx">http://www.website.net/ThisMustBeSSL/userdetailseform.aspx</a> the script matches all conditions and the redirect will be issued to make the site HTTPS.</p>
<p>However if you request <a href="http://www.website.net/thismustbessl/userdetailseform.aspx">http://www.website.net/thismustbessl/userdetailseform.aspx</a></p>
<p>The traffic script will not match and the page will be served as HTTP. Disaster!</p>
<p><a href="http://www.clusterfunk.co.uk/wp-content/uploads/2009/05/image10.png"><img style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" title="image" src="http://www.clusterfunk.co.uk/wp-content/uploads/2009/05/image-thumb10.png" border="0" alt="image" width="147" height="100" /></a></p>
<p>To avoid this occurring a minor but crucial change is required. First do a string conversion on the url, I force the url to be lowercase but you could equally use uppercase if you wish. Then make sure that all of the strings you are comparing are also the same case (lowercase in my example). This will allows match regardless of the case that the original request is submitted as.</p>
<p>$url = http.getRawURL();<br />
$host = http.getHeader (&#8220;host&#8221;);</p>
<p><strong>$s = string.lowercase($url); # set $s to equal lowercase $url<br />
$url = $s;  ~ now set $url to equal </strong></p>
<p>if (($host == &#8220;<a href="http://www.website.net">www.website.net</a>&#8220;) &amp;&amp; (string.contains($url, &#8220;<strong>login.aspx</strong>&#8220;)) || (string.contains($url, &#8220;<strong>signup.aspx</strong>&#8220;)) ||</p>
<p>(string.contains($url, &#8220;<strong>/thismustbessl/userdetailseform.aspx</strong>&#8220;)) || (string.contains($url, &#8220;/admin/&#8221;))) {</p>
<p>http.sendResponse( &#8220;301 Moved Permanently&#8221;, &#8220;text/html&#8221;, &#8220;&#8221;, &#8220;Location: <a href="https://">https://&#8221;.$host</a> . $url);<br />
}</p>
<p>Now everything is cool <img src='http://www.clusterfunk.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><a href="http://www.clusterfunk.co.uk/wp-content/uploads/2009/05/image11.png"><img style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" title="image" src="http://www.clusterfunk.co.uk/wp-content/uploads/2009/05/image-thumb11.png" border="0" alt="image" width="168" height="244" /></a></p>
<p>Happy Days….</p>
]]></content:encoded>
			<wfw:commentRss>http://www.clusterfunk.co.uk/zxtm-http-redirects-with-traffic-script/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Traffic Script Debug Tip</title>
		<link>http://www.clusterfunk.co.uk/traffic-script-debug-tip/</link>
		<comments>http://www.clusterfunk.co.uk/traffic-script-debug-tip/#comments</comments>
		<pubDate>Mon, 08 Jun 2009 06:00:00 +0000</pubDate>
		<dc:creator>Antony Joyce</dc:creator>
				<category><![CDATA[Tool, Tips and Tricks]]></category>
		<category><![CDATA[Zeus ZXTM]]></category>

		<guid isPermaLink="false">http://www.clusterfunk.co.uk/traffic-script-debug-tip/</guid>
		<description><![CDATA[
When you write traffic script make sure that you comment you scripts with plenty of debug information to facilitate testing.

Example:
$responseLocation = http.getResponseHeader(&#8220;Location&#8221;);
$body = response.get();
$responseCode = http.getResponseCode();
log.info( &#8220;Location at Zone A ZXTM is : &#8221; . $responseLocation );
log.info( &#8220;Body is : &#8221; . $body );
# Test for HTTP 302, Location is HTTP and body contains HTTPS
if [...]]]></description>
			<content:encoded><![CDATA[<h4><strong></strong></h4>
<p>When you write traffic script make sure that you comment you scripts with plenty of debug information to facilitate testing.</p>
<p><a href="http://www.clusterfunk.co.uk/wp-content/uploads/2009/05/image7.png"><img title="image" src="http://www.clusterfunk.co.uk/wp-content/uploads/2009/05/image-thumb7.png" border="0" alt="image" width="163" height="56" /></a></p>
<p>Example:</p>
<p>$responseLocation = http.getResponseHeader(&#8220;Location&#8221;);<br />
$body = response.get();<br />
$responseCode = http.getResponseCode();</p>
<p>log.info( &#8220;Location at Zone A ZXTM is : &#8221; . $responseLocation );<br />
log.info( &#8220;Body is : &#8221; . $body );</p>
<p># Test for HTTP 302, Location is HTTP and body contains HTTPS<br />
if (($responseCode == 302) &amp;&amp; (string.startsWith($responseLocation,&#8221;http://&#8221;)) &amp;&amp; ( string.contains($body, &#8220;a href=’https://&#8221;)) ){</p>
<p># Rewrite location header<br />
$responseLocation = string.replace($responseLocation, &#8220;http:&#8221;, &#8220;https:&#8221;);<br />
log.info( &#8220;Location has been rewriten to : &#8221; . $responseLocation );<br />
http.setResponseHeader( &#8220;Location&#8221;, $responseLocation );</p>
<p>}</p>
<p><strong>View Log</strong></p>
<p>Then when you are testing your scripts SSH to the ZXTM and run the following command to view the log as events are written to it.</p>
<p>tail –f /usr/local/zeus/zxtm/log/errors</p>
<p>You can then view the log as you test to check that your script is behaving as expected.</p>
<p>Once complete rather than amending your script, which could potentially introduce bugs. change the logging level in the ZXTM config to not log info messages.</p>
<p>You simply turn this on and off as required for testing.</p>
<p><a href="http://www.clusterfunk.co.uk/wp-content/uploads/2009/05/clip-image0021.jpg"><img title="clip_image002" src="http://www.clusterfunk.co.uk/wp-content/uploads/2009/05/clip-image002-thumb1.jpg" border="0" alt="clip_image002" width="335" height="266" /></a></p>
<p><a href="http://www.clusterfunk.co.uk/wp-content/uploads/2009/05/clip-image004.jpg"><img title="clip_image004" src="http://www.clusterfunk.co.uk/wp-content/uploads/2009/05/clip-image004-thumb.jpg" border="0" alt="clip_image004" width="341" height="144" /></a></p>
<p>Happy Debugging <img src="http://www.clusterfunk.co.uk/wp-includes/images/smilies/icon_smile.gif" alt=":)" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.clusterfunk.co.uk/traffic-script-debug-tip/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ZXTM Traffic Script for filtering access to web site based on IP</title>
		<link>http://www.clusterfunk.co.uk/zxtm-traffic-script-for-filtering-access-to-web-site-based-on-ip/</link>
		<comments>http://www.clusterfunk.co.uk/zxtm-traffic-script-for-filtering-access-to-web-site-based-on-ip/#comments</comments>
		<pubDate>Mon, 01 Jun 2009 07:00:00 +0000</pubDate>
		<dc:creator>Antony Joyce</dc:creator>
				<category><![CDATA[Zeus ZXTM]]></category>

		<guid isPermaLink="false">http://www.clusterfunk.co.uk/zxtm-traffic-script-for-filtering-access-to-web-site-based-on-ip/</guid>
		<description><![CDATA[
If you want to filter based on IP address you have a number of options with Traffic Script.You can filter based on subnet mask, file based white list and regular expressions.
Mask Based Filter
This example tests the remote IP against the entire 10.0.0.0 address range if the address resides within that range the connection is closed.
$ip [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.clusterfunk.co.uk/wp-content/uploads/2009/05/image8.png"><img style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" title="image" src="http://www.clusterfunk.co.uk/wp-content/uploads/2009/05/image-thumb8.png" border="0" alt="image" width="206" height="86" /></a></p>
<p>If you want to filter based on IP address you have a number of options with Traffic Script.You can filter based on subnet mask, file based white list and regular expressions.</p>
<p><strong>Mask Based Filter</strong></p>
<p>This example tests the remote IP against the entire 10.0.0.0 address range if the address resides within that range the connection is closed.</p>
<p><span style="color: #ff0000;">$ip = request.getRemoteIP();</span></p>
<p><span style="color: #ff0000;">if string.ipmaskmatch($ip, &#8220;10.0.0.0/8&#8243;)) {<br />
connection.close( &#8220;500 Unauthorised\r\n&#8221; );<br />
}</span></p>
<p><strong>File Based White List </strong></p>
<p>In this example we need to restrict access to specific area of the web site to specific staff computers. First of all you need to create a file in ZXTM install location if your using the default install location its</p>
<p>/usr/local/zeus/zxtm/conf/extra</p>
<p>You can create as many files as you like for different white list purposes. Following the Zeus Knowledge Hub <a href="http://knowledgehub.zeus.com/code/2006/09/15/how_do_i_restrict_my_website_to_certain" target="_blank">example</a> this file is called trusted_ips</p>
<p><span style="color: #8000ff;">$siteaddress = http.getHostHeader();<br />
$rawurl = http.getRawurl();<br />
$ip = request.getRemoteIP();<br />
$trusted_user_file = &#8220;trusted_ips&#8221;;<br />
$trusted_ips = resource.get( &#8220;trusted_ips&#8221; );</span></p>
<p><span style="color: #8000ff;">if (($siteaddress  == ( &#8220;</span><a href="http://www.website.com"><span style="color: #8000ff;">www.website.com</span></a><span style="color: #8000ff;">&#8221; )) &amp;&amp; ( string.contains( $rawurl, &#8220;/payments/secure/&#8221; ))) {</p>
<p># Check IP<br />
if( string.contains( $trusted_ips, $ip ) == 0 ) {<br />
connection.close( &#8220;500 Unauthorised\r\n&#8221; ); </span></p>
<p><span style="color: #8000ff;">}<br />
}</span></p>
<p><strong>Regular Expressions</strong></p>
<p><span style="color: #400000;">If like i did, you think this looks like ramblings of a mad math professor, stick with it. Its actually quite straightforward and very very powerful <img src='http://www.clusterfunk.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  </span></p>
<p>The key to this is the reg ex<br />
When you put the value you want to test in () the value is assigned to $1 thru $9</p>
<p>So this example has $1 and $2</p>
<p>string.regexMatch($ip, &#8220;([0-9]+)<a href="file://\\.([0-9]+)\\.[0-9]+\\.[0-9]+&quot;)">\\.([0-9]+)\\.[0-9]+\\.[0-9]+&#8221;)</a>;</p>
<p>This example has variables $1 $2 $3 and $4</p>
<p>string.regexMatch($ip, &#8220;([0-9]+)<a href="file://\\.([0-9]+)\\.([0-9]+)\\.([0-9]+)&quot;)">\\.([0-9]+)\\.([0-9]+)\\.([0-9]+)&#8221;)</a>;</p>
<p>We can then test the values of $1 $2 etc</p>
<p>e.g.<br />
if $1 == 192 {<br />
do something<br />
}</p>
<p><span style="color: #400000;">This is taken from a script I produced that had to allow certain IPs within any /24 subnet from a within 192.4.160</span></p>
<p><span style="color: #400000;"><strong>Example</strong></span></p>
<p><span style="color: #008080;">$ip = request.getRemoteIP();<br />
</span></p>
<p><span style="color: #008080;">string.regexMatch($ip, &#8220;[0-9]+\\.[0-9]+\\.([0-9]+)</span><a href="file:///\\.[0-9"><span style="color: #008080;">\\.[0-9</span></a><span style="color: #008080;">]+&#8221;);</span></p>
<p><span style="color: #008080;"># log.info (&#8220;Matched the mask to 192.4.0.0/16&#8243;);<br />
# Match 192.4.160.x to 192.4.161.x OR<br />
# Match 192.4.8.x to 192.4.9.x </span></p>
<p><span style="color: #008080;"> if (($1 &gt;= 160 &amp;&amp; $1 &lt; 162) || ($1 &gt;= 8 &amp;&amp; $1 &lt; 10)) { </span></p>
<p><span style="color: #008080;">#         log.info (&#8220;Matched at RegEx&#8221;); </span></p>
<p><span style="color: #008080;">} else<br />
connection.close( &#8220;500 Unauthorised\r\n&#8221; );<br />
}<br />
}</span></p>
<p><strong>A bit more on Reg Ex</strong></p>
<p>The key to this is the reg ex</p>
<p>When you put the value you want to test in () the value is assigned to $1 thru $9</p>
<p>So this example has $1 and $2</p>
<p>string.regexMatch($ip, &#8220;([0-9]+)<a href="file://\\.([0-9]+)\\.[0-9]+\\.[0-9]+&quot;)">\\.([0-9]+)\\.[0-9]+\\.[0-9]+&#8221;)</a>;</p>
<p>This example has variables $1 $2 $3 and $4</p>
<p>string.regexMatch($ip, &#8220;([0-9]+)<a href="file://\\.([0-9]+)\\.([0-9]+)\\.([0-9]+)&quot;)">\\.([0-9]+)\\.([0-9]+)\\.([0-9]+)&#8221;)</a>;</p>
<p>We can then test the values of $1 $2 etc</p>
<p>e.g.</p>
<p>if $1 == 192 {</p>
<p>do something</p>
<p>}</p>
<p>ZXTM traffic Script conforms to the PRCE Regular Expression compatible library.<br />
More info here <a href="http://perldoc.perl.org/perlre.html" target="_blank">http://perldoc.perl.org/perlre.html</a></p>
<p><strong>Putting it all together:</strong> <strong>Example Script </strong></p>
<p>This example is used to match a set of web sites host names and then test the client IP to see if the request is from a machine considered to be internal in this network. If its not internal the client is directed to a pool that requires two factor authentication.</p>
<p><span style="color: #0000ff;">$siteaddress = http.getHostHeader();<br />
$ip = request.getRemoteIP();</span></p>
<p><span style="color: #0000ff;">if ($siteaddress  == ( </span><a href="http://www.siteone.co.uk"><span style="color: #0000ff;">www.siteone.co.uk</span></a><span style="color: #0000ff;"> ) ||<br />
$siteaddress  == ( &#8220;</span><a href="http://www.sitetwo.co.uk"><span style="color: #0000ff;">www.sitetwo.co.uk</span></a><span style="color: #0000ff;"> &#8221; ) ||<br />
$siteaddress  == ( &#8220;www.siteone.net &#8221; ) ||<br />
$siteaddress  == ( </span><a href="http://www.siteone.com"><span style="color: #0000ff;">www.siteone.com</span></a><span style="color: #0000ff;"> ) ||<br />
$siteaddress  == ( &#8220;somethingelse.net&#8221; )) {</span></p>
<p><span style="color: #0000ff;">log.info ( &#8220;2FA Rule &#8221; . $ip . &#8221; Host = &#8221; . $siteaddress );</span></p>
<p><span style="color: #0000ff;">if(string.ipmaskmatch($ip, &#8220;10.0.0.0/8&#8243;)){<br />
string.regexMatch($ip, &#8220;([0-9]+)</span><a href="file:///\\.([0-9]+)\.%5b0-9%5d+\.%5b0-9%5d+%22)"><span style="color: #0000ff;">\\.([0-9]+)\\.[0-9]+\\.[0-9]+&#8221;)</span></a><span style="color: #0000ff;">;</span></p>
<p><span style="color: #0000ff;"> # log.info (&#8220;Matched the mask to 10.0.0.0/8&#8243;);<br />
# Match 192.0.0.0 to 192.150.255.255  OR<br />
# Match 192.158.0.0 to 192.201.255.255 </span></p>
<p><span style="color: #0000ff;"> if (($1 == 192 &amp;&amp; $2 &lt; 151) ||<br />
($1 == 192 &amp;&amp; $2 &gt;= 158 &amp;&amp; $2 &lt; 202)) {<br />
#         log.info (&#8220;Matched at RegEx&#8221;);<br />
pool.use ( &#8220;HTTP&#8221; );<br />
} else {<br />
# Address is External<br />
pool.use ( &#8220;RADIUS&#8221; );<br />
}</span></p>
<p>Enjoy <img src='http://www.clusterfunk.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.clusterfunk.co.uk/zxtm-traffic-script-for-filtering-access-to-web-site-based-on-ip/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ISA HTTP 302 Location header fixed with ZXTM Traffic Script</title>
		<link>http://www.clusterfunk.co.uk/isa-http-302-location-header-fixed-with-zxtm-traffic-script/</link>
		<comments>http://www.clusterfunk.co.uk/isa-http-302-location-header-fixed-with-zxtm-traffic-script/#comments</comments>
		<pubDate>Fri, 29 May 2009 10:33:25 +0000</pubDate>
		<dc:creator>Antony Joyce</dc:creator>
				<category><![CDATA[ISA Server]]></category>
		<category><![CDATA[Zeus ZXTM]]></category>

		<guid isPermaLink="false">http://www.clusterfunk.co.uk/isa-http-302-location-header-fixed-with-zxtm-traffic-script/</guid>
		<description><![CDATA[I recently had to debug this tricky little problem with ISA 2006. ISA decided for some reason (that I am yet to get to the bottom of), that it didn’t like the Location response header received from the web servers and changed the header from&#160; HTTPS://hostname/url to HTTP://hostname/url . 
First off I tried to eliminate [...]]]></description>
			<content:encoded><![CDATA[<p>I recently had to debug this tricky little problem with ISA 2006. ISA decided for some reason (that I am yet to get to the bottom of), that it didn’t like the Location response header received from the web servers and changed the header from&#160; <a href="https://hostname/url">HTTPS://hostname/url</a> to HTTP://hostname/url . </p>
<p>First off I tried to eliminate any ISA functionality that may cause this behaviour by design as I have ZXTMs in the environment I disabled link translation globally and checked that the HTTP filter on the listener wasn’t configured to manipulate response headers in anyway. </p>
<p>Here’s the problem (This is a complex local government network with many thousands of users at tens, if not hundreds of WAN linked locations). </p>
<p>&#160;</p>
<p><a href="http://www.clusterfunk.co.uk/wp-content/uploads/2009/05/image.png"><img title="image" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="399" alt="image" src="http://www.clusterfunk.co.uk/wp-content/uploads/2009/05/image-thumb.png" width="332" border="0" /></a> </p>
<p> The Web Server has a site that controls SSL. The client requests a URL that needs to be SSL. The web server issues a HTTP 302 redirect see below. Between the Internal Interface of ISA server and the External Interface the Location Header in the response to the client is modified from HTTPS to HTTP. this is bad and results in an infinite loop of request and 302 response.&#160; </p>
<p>Request and HTTP 302 Response</p>
<p><a href="http://www.clusterfunk.co.uk/wp-content/uploads/2009/05/image1.png"><img title="image" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="300" alt="image" src="http://www.clusterfunk.co.uk/wp-content/uploads/2009/05/image-thumb1.png" width="266" border="0" /></a> </p>
<p>Wireshark capture at Zone B ISA</p>
<p><a href="http://www.clusterfunk.co.uk/wp-content/uploads/2009/05/image2.png"><img title="image" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="280" alt="image" src="http://www.clusterfunk.co.uk/wp-content/uploads/2009/05/image-thumb2.png" width="330" border="0" /></a> </p>
<p>We still have a HTTPS URL in the Location Header.</p>
<p><a href="http://www.clusterfunk.co.uk/wp-content/uploads/2009/05/image3.png"><img title="image" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="20" alt="image" src="http://www.clusterfunk.co.uk/wp-content/uploads/2009/05/image-thumb3.png" width="573" border="0" /></a>&#160;</p>
<p>Wireshark Capture at Zone A ISA </p>
<p><a href="http://www.clusterfunk.co.uk/wp-content/uploads/2009/05/image4.png"><img title="image" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="208" alt="image" src="http://www.clusterfunk.co.uk/wp-content/uploads/2009/05/image-thumb4.png" width="244" border="0" /></a> </p>
<p>And now we don’t have a HTTPS Location Header</p>
<p><a href="http://www.clusterfunk.co.uk/wp-content/uploads/2009/05/image5.png"><img title="image" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="25" alt="image" src="http://www.clusterfunk.co.uk/wp-content/uploads/2009/05/image-thumb5.png" width="575" border="0" /></a> </p>
<p>Anyone who know why ISA would modify the Location header in the response please feel free to enlighten me <img src='http://www.clusterfunk.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> . The ISA configuration is a basic firewall configuration with web publishing rule sending requests to ZXTM IP behind the ISA internal interfaces. </p>
<p>&#160;</p>
<p>In a less complex deployment you would probably would not have this issue but this solution had ISA due to client requirements to use some of the functionality provided by ISA Server. </p>
<p>ZXTM traffic script to the rescue!</p>
<p>This is a problem that can be addressed in a number of ways. You could add a custom HTTP header which you checked once the response hits the external Interface on the ZXTM or in this example the response body also contained the full https URL so the traffic script below looks for this and modifies the Location Header if it finds a 302 response like this:   <br />&#160; </p>
<p><a href="http://www.clusterfunk.co.uk/wp-content/uploads/2009/05/image6.png"><img title="image" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="111" alt="image" src="http://www.clusterfunk.co.uk/wp-content/uploads/2009/05/image-thumb6.png" width="473" border="0" /></a> </p>
<p>&#160;</p>
<p>$responseLocation = http.getResponseHeader(&quot;Location&quot;);   <br />$body = response.get();    <br />$responseCode = http.getResponseCode();</p>
<p>log.info( &quot;Location at Zone A ZXTM is : &quot; . $responseLocation );   <br />log.info( &quot;Body is : &quot; . $body );</p>
<p># Test for HTTP 302, Location is HTTP and body contains HTTPS </p>
<p>if (($responseCode == 302) &amp;&amp; (string.startsWith($responseLocation,&quot;http://&quot;)) &amp;&amp; ( string.contains($body, &quot;a href=&#8217;https://&quot;)) ){</p>
<p># Rewrite location header   <br />$responseLocation = string.replace($responseLocation, &quot;http:&quot;, &quot;https:&quot;);</p>
<p>#log.info( &quot;Location has been rewriten to : &quot; . $responseLocation );</p>
<p>http.setResponseHeader( &quot;Location&quot;, $responseLocation );   <br />}</p>
<p><a href="http://www.clusterfunk.co.uk/wp-content/uploads/2009/05/clip-image002.jpg"><img title="clip_image002" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="276" alt="clip_image002" src="http://www.clusterfunk.co.uk/wp-content/uploads/2009/05/clip-image002-thumb.jpg" width="324" border="0" /></a></p>
<p>The traffic script is so powerful and this is why I love working with ZXTMs!</p>
<p>Happy Scripting…. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.clusterfunk.co.uk/isa-http-302-location-header-fixed-with-zxtm-traffic-script/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Zeus ZXTM: How to export .PFX SSL Certificate into .PEM Format</title>
		<link>http://www.clusterfunk.co.uk/zeus-zxtm-how-to-export-pfx-ssl-certificate-into-pem-format/</link>
		<comments>http://www.clusterfunk.co.uk/zeus-zxtm-how-to-export-pfx-ssl-certificate-into-pem-format/#comments</comments>
		<pubDate>Wed, 29 Apr 2009 17:15:15 +0000</pubDate>
		<dc:creator>Antony Joyce</dc:creator>
				<category><![CDATA[Tool, Tips and Tricks]]></category>
		<category><![CDATA[Zeus ZXTM]]></category>

		<guid isPermaLink="false">http://www.clusterfunk.co.uk/zeus-zxtm-how-to-export-pfx-ssl-certificate-into-pem-format/</guid>
		<description><![CDATA[ 
Zeus Knowledge hub has an article here but I thought I would elaborate a little for the benefit of the Windows Admin’s   
This assumes that you have a Windows machine on which to do the conversion. 
1) Install OpenSSL 
Windows binary here http://www.slproweb.com/products/Win32OpenSSL.html
2) Export Private Key from .PFX 
Once you have installed [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.clusterfunk.co.uk/wp-content/uploads/2009/04/image29.png"><img title="image" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="79" alt="image" src="http://www.clusterfunk.co.uk/wp-content/uploads/2009/04/image-thumb29.png" width="205" border="0" /></a> </p>
<p>Zeus Knowledge hub has an article <a href="http://knowledgehub.zeus.com/faqs/2006/06/08/how_do_i_import_certificates_exported_fr" target="_blank">here</a> but I thought I would elaborate a little for the benefit of the Windows Admin’s <img src='http://www.clusterfunk.co.uk/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  </p>
<p>This assumes that you have a Windows machine on which to do the conversion. </p>
<p><b>1) </b><b>Install OpenSSL </b></p>
<p>Windows binary here <a href="http://www.slproweb.com/products/Win32OpenSSL.html">http://www.slproweb.com/products/Win32OpenSSL.html</a></p>
<p><b>2) </b><b>Export Private Key from .PFX </b></p>
<p>Once you have installed openSSL </p>
<p>Do the following: </p>
<p>Copy your .PFX file to local file system on the windows machine you have installed OpenSSL on -</p>
<p><a href="http://www.clusterfunk.co.uk/wp-content/uploads/2009/04/clip-image002.jpg"><img title="clip_image002" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="144" alt="clip_image002" src="http://www.clusterfunk.co.uk/wp-content/uploads/2009/04/clip-image002-thumb.jpg" width="319" border="0" /></a></p>
<p>If you follow default install navigate to c:\openssl\bin\ and enter </p>
<p>openssl.exe pkcs12 -in &lt;drive\path\name.pfx&gt; -nodes -out drive\path\name.pem&gt;</p>
<p>e.g. openssl.exe pkcs12 -in C:\cert\govuk.pfx -nodes -out c:\cert\PKgovuk.pem</p>
<p><a href="http://www.clusterfunk.co.uk/wp-content/uploads/2009/04/clip-image004.jpg"><img title="clip_image004" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="165" alt="clip_image004" src="http://www.clusterfunk.co.uk/wp-content/uploads/2009/04/clip-image004-thumb.jpg" width="321" border="0" /></a></p>
<p>Type the password for the PFX file</p>
<p><a href="http://www.clusterfunk.co.uk/wp-content/uploads/2009/04/clip-image006.jpg"><img title="clip_image006" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="165" alt="clip_image006" src="http://www.clusterfunk.co.uk/wp-content/uploads/2009/04/clip-image006-thumb.jpg" width="321" border="0" /></a></p>
<p>You should see a .pem file for the private key in your folder.</p>
<p><a href="http://www.clusterfunk.co.uk/wp-content/uploads/2009/04/clip-image008.jpg"><img title="clip_image008" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="120" alt="clip_image008" src="http://www.clusterfunk.co.uk/wp-content/uploads/2009/04/clip-image008-thumb.jpg" width="319" border="0" /></a></p>
<p><b>3) </b><b>Export Certificate</b></p>
<p>Now repeat the process but this time use following syntax to export the certificate</p>
<p>openssl.exe pkcs12 -in C:\cert\govuk.pfx -nokeys -out c:\cert\Certgovuk.pem</p>
<p><a href="http://www.clusterfunk.co.uk/wp-content/uploads/2009/04/clip-image010.jpg"><img title="clip_image010" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="166" alt="clip_image010" src="http://www.clusterfunk.co.uk/wp-content/uploads/2009/04/clip-image010-thumb.jpg" width="326" border="0" /></a></p>
<p>You should see this:</p>
<p><a href="http://www.clusterfunk.co.uk/wp-content/uploads/2009/04/clip-image012.jpg"><img title="clip_image012" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="170" alt="clip_image012" src="http://www.clusterfunk.co.uk/wp-content/uploads/2009/04/clip-image012-thumb.jpg" width="331" border="0" /></a></p>
<p>and a new file</p>
<p><a href="http://www.clusterfunk.co.uk/wp-content/uploads/2009/04/clip-image014.jpg"><img title="clip_image014" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="128" alt="clip_image014" src="http://www.clusterfunk.co.uk/wp-content/uploads/2009/04/clip-image014-thumb.jpg" width="342" border="0" /></a></p>
<p><b>4) </b><b>Import into ZXTM</b></p>
<p>Open admin console and navigate to catalogue \ SSL \ Server Certs </p>
<p><a href="http://www.clusterfunk.co.uk/wp-content/uploads/2009/04/clip-image016.jpg"><img title="clip_image016" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="79" alt="clip_image016" src="http://www.clusterfunk.co.uk/wp-content/uploads/2009/04/clip-image016-thumb.jpg" width="412" border="0" /></a></p>
<p>Select Import Certificate</p>
<p><a href="http://www.clusterfunk.co.uk/wp-content/uploads/2009/04/clip-image018.jpg"><img title="clip_image018" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="62" alt="clip_image018" src="http://www.clusterfunk.co.uk/wp-content/uploads/2009/04/clip-image018-thumb.jpg" width="334" border="0" /></a></p>
<p>Give your cert a name and populate the location of your cert and private key .pem files. Click “Import Certificate” </p>
<p><a href="http://www.clusterfunk.co.uk/wp-content/uploads/2009/04/clip-image020.jpg"><img title="clip_image020" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="201" alt="clip_image020" src="http://www.clusterfunk.co.uk/wp-content/uploads/2009/04/clip-image020-thumb.jpg" width="391" border="0" /></a></p>
<p>You should now see following. </p>
<p><a href="http://www.clusterfunk.co.uk/wp-content/uploads/2009/04/clip-image022.jpg"><img title="clip_image022" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="119" alt="clip_image022" src="http://www.clusterfunk.co.uk/wp-content/uploads/2009/04/clip-image022-thumb.jpg" width="397" border="0" /></a></p>
<p>It is more than likely that you will require an intermediary Certificate to complete the key chain. </p>
<p>5) <strong>Intermediary Certificate</strong> </p>
<p>If the Cert requires an Intermediary to complete the certificate chain do the following:</p>
<p>Download the appropriate certificate from the issuing Certificate Authority. In this example the CA is global sign </p>
<p>Cert is Here:</p>
<p><a href="http://www.globalsign.com/support/intermediate/domainssl_intermediate.php">http://www.globalsign.com/support/intermediate/domainssl_intermediate.php</a></p>
<p>VeriSign here: <a href="http://www.verisign.com/support/install2/intermediate.html">http://www.verisign.com/support/install2/intermediate.html</a></p>
<p>And Thawte requires login here: <a href="http://www.thawte.com/roots/index.html">http://www.thawte.com/roots/index.html</a></p>
<p>Download the intermediate certificate, this is usually via copying the cert from the web page and saving in a text file. Call the file intermediate.pem</p>
<p>Open the Imported SSL Cert and (scroll down) select install intermediate. </p>
<p><a href="http://www.clusterfunk.co.uk/wp-content/uploads/2009/04/clip-image024.jpg"><img title="clip_image024" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="168" alt="clip_image024" src="http://www.clusterfunk.co.uk/wp-content/uploads/2009/04/clip-image024-thumb.jpg" width="378" border="0" /></a></p>
<p>Populate the box with the location of the cert and then click upload.</p>
<p><a href="http://www.clusterfunk.co.uk/wp-content/uploads/2009/04/clip-image026.jpg"><img title="clip_image026" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="227" alt="clip_image026" src="http://www.clusterfunk.co.uk/wp-content/uploads/2009/04/clip-image026-thumb.jpg" width="366" border="0" /></a></p>
<p>You should see something similar to below</p>
<p><a href="http://www.clusterfunk.co.uk/wp-content/uploads/2009/04/clip-image028.jpg"><img title="clip_image028" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="263" alt="clip_image028" src="http://www.clusterfunk.co.uk/wp-content/uploads/2009/04/clip-image028-thumb.jpg" width="370" border="0" /></a></p>
<p><b>6) Finished </b></p>
<p><a href="http://www.clusterfunk.co.uk/wp-content/uploads/2009/04/clip-image030.jpg"><img title="clip_image030" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="213" alt="clip_image030" src="http://www.clusterfunk.co.uk/wp-content/uploads/2009/04/clip-image030-thumb.jpg" width="370" border="0" /></a></p>
<p>Test by navigating to the site and verify the certificate via the browser. The Certificate should be valid and display the complete key chain.</p>
<p>- FIN &#8211; </p>
]]></content:encoded>
			<wfw:commentRss>http://www.clusterfunk.co.uk/zeus-zxtm-how-to-export-pfx-ssl-certificate-into-pem-format/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
