<?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>Liquidstate.net</title>
	<atom:link href="http://www.liquidstate.net/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.liquidstate.net/blog</link>
	<description>The digital home of Bryan Ross</description>
	<lastBuildDate>Wed, 18 Jan 2012 23:32:14 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Using RemoteApp with VMware ESXi in 7 Easy Steps</title>
		<link>http://www.liquidstate.net/blog/technology/using-remoteapp-with-vmware-esxi-in-7-easy-steps/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=using-remoteapp-with-vmware-esxi-in-7-easy-steps</link>
		<comments>http://www.liquidstate.net/blog/technology/using-remoteapp-with-vmware-esxi-in-7-easy-steps/#comments</comments>
		<pubDate>Wed, 18 Jan 2012 23:29:13 +0000</pubDate>
		<dc:creator>Bryan</dc:creator>
				<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://www.liquidstate.net/blog/?p=860</guid>
		<description><![CDATA[Have you tried XP Mode in Windows 7?  Or VMware Unity in Workstation?  Quite cool isn&#8217;t it!  Wouldn&#8217;t it be nice if you could have the same seamlessly integration of applications running on a remote computer or from a virtual machine running on a VMware ESXi host?  Well . . . you can!  Read on! [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-full wp-image-883" title="RemoteApp" src="http://www.liquidstate.net/blog/wp-content/uploads/2012/01/RemoteApp.png" alt="" width="195" height="150" />Have you tried <a title="XP Mode" href="http://windows.microsoft.com/en-GB/windows7/products/features/windows-xp-mode" target="_blank">XP Mode</a> in Windows 7?  Or <a title="VMware Workstation" href="http://www.vmware.com/products/workstation/overview.html" target="_blank">VMware Unity</a> in Workstation?  Quite cool isn&#8217;t it!  Wouldn&#8217;t it be nice if you could have the same seamlessly integration of applications running on a remote computer or from a virtual machine running on a VMware ESXi host?  Well . . . you can!  Read on!</p>
<h2>What is RemoteApp?</h2>
<p>RemoteApp enables you to make programs that are accessed remotely through Remote Desktop Services appear as if they are running on the end user&#8217;s local computer.  These programs are referred to as RemoteApp programs.  Instead of being presented to the user in the desktop of the Remote Desktop Session Host server, the RemoteApp program is integrated with the client&#8217;s desktop.  The RemoteApp program runs in its own resizable window, can be dragged between multiple monitors, and has its own entry in the taskbar.</p>
<p>Usually, RemoteApps are hosted on Windows Server 2008 (and above), but some smart folk figured out how to host them on other versions, including Windows XP and Windows 7.</p>
<h2>Why would you want to do this?</h2>
<p>There&#8217;s lots of uses for this, like sandboxing software or easily running multiple versions of a piece of software side-by-side.  However, here at Liquidstate, I wanted a nice way of using applications installed on virtual machines.  I&#8217;ve used VMware Workstation with its Unity mode and wanted a similar experience, but using virtual machines hosted on my ESXi server, rather than having a hypervisor running on my desktop.  The key benefit for me is that I can have a network unaware application like &#8220;iTunes&#8221; installed on a virtual machine that I can access from any device in my house.  RemoteApp just makes that experience a little nicer.</p>
<p>Here&#8217;s an example of Notepad running on my Windows 7 desktop PC, right next to a RemoteApp version of Notepad running from a Windows XP virtual machine hosted on my ESXi server.</p>
<p style="text-align: center;"><a href="http://www.liquidstate.net/blog/wp-content/uploads/2012/01/RemoteAppExample.png" rel="shadowbox[sbpost-860];player=img;" title="RemoteApp Example"><img class="size-medium wp-image-862 aligncenter" title="RemoteApp Example" src="http://www.liquidstate.net/blog/wp-content/uploads/2012/01/RemoteAppExample-285x176.png" alt="" width="285" height="176" /></a></p>
<h2 style="text-align: left;">How do I do that?</h2>
<p>In this post, I&#8217;ll walk you through how I achieved the above example whereby we have seamless integrated Notepad running on a virtualised Windows XP machine.</p>
<p>In the following steps, I&#8217;ll refer to my &#8220;local machine&#8221; as being the physical Windows 7 computer I&#8217;m sitting in front of.  The &#8220;remote machine&#8221; is a the virtual machine running on a remote VMware ESXi server.</p>
<h3>Step 1 &#8211; install Remote Desktop Client v7</h3>
<p>RemoteApp requires Remote Desktop Client v7 to be installed on both your local and remote machines.  In this example, my local machine is fine because its running Windows 7, but the remote virtual machine is running Windows XP SP3.</p>
<p>Download Remote Desktop Client 7 for Windows XP SP3 <a title="RDP 7.0 for Windows XP SP3" href="http://www.microsoft.com/downloads/details.aspx?FamilyId=72158b4e-b527-45e4-af24-d02938a95683" target="_blank">here</a> and install it onto the remote machine.</p>
<h3>Step 2 &#8211; install Update for Windows XP SP3 to enable RemoteApp</h3>
<p>If your remote machine is running Windows XP (which ours is in this example), then you will need to download and install the hotfix released by Microsoft.  Its available <a title="Update for Windows XP SP3 to enable RemoteApp" href="http://www.microsoft.com/download/en/details.aspx?displaylang=en&amp;id=4465" target="_blank">here</a> and will require a reboot.</p>
<h3>Step 3 &#8211; set up a user account to use for RemoteApps</h3>
<p>Now we will create a new user account on our remote Windows XP machine that will be used to run our RemoteApps.  In this example, I&#8217;ve created a &#8220;Test&#8221; user with Administrative privileges and the password &#8220;Test&#8221;.</p>
<p><a href="http://www.liquidstate.net/blog/wp-content/uploads/2012/01/RemoteAppUser.png" rel="shadowbox[sbpost-860];player=img;" title="Adding a RemoteApp User"><img class="aligncenter size-medium wp-image-864" title="Adding a RemoteApp User" src="http://www.liquidstate.net/blog/wp-content/uploads/2012/01/RemoteAppUser-285x204.png" alt="" width="285" height="204" /></a></p>
<h3>Step 4 &#8211; install Microsoft .NET Frame 3.5 SP1</h3>
<p>Later in this post we will be using a tool that requires the Microsoft .NET Framework 3.5 to run.  Download it from <a title="Microsoft .NET Framework 3.5 SP1" href="http://www.microsoft.com/download/en/details.aspx?id=31" target="_blank">here</a> and install it onto the remote machine(s) that you plan to access via RDP.</p>
<h3>Step 5 &#8211; install the RemoteApp Tool</h3>
<p>As discussed earlier, RemoteApps are usually hosted on Windows Server 2008 (and above), but some smart folk figured out that you can make them work on other versions, including Windows XP and Windows 7. This required manually editing of the registry and RDP files.  Thankfully, Kim Knight created the <a title="RemoteApp Tool" href="https://sites.google.com/site/kimknight/remoteapptool" target="_blank">RemoteApp Tool</a>, a GUI tool that allows you to create and manage RemoteApps hosted on a remote machine as well as automatically generate RDP files for use on your local PC.</p>
<p>Download the latest version from Kim&#8217;s website and install it onto the remote machine(s) that you plan to access via RDP.</p>
<h3>Step 6 &#8211; create a new RemoteApp</h3>
<p>Log in to your remote computer through RDP as normal and run the RemoteApp tool that you installed in the previous step.  Create a new RemoteApp by clicking the &#8220;Create new&#8230;&#8221; button and giving it any name you like.  Now fill in the Properties section.  Below is a screenshot of my example Notepad application:</p>
<p><a href="http://www.liquidstate.net/blog/wp-content/uploads/2012/01/RemoteAppNotepad.png" rel="shadowbox[sbpost-860];player=img;" title="RemoteApp Configuration"><img class="aligncenter size-medium wp-image-863" title="RemoteApp Configuration" src="http://www.liquidstate.net/blog/wp-content/uploads/2012/01/RemoteAppNotepad-285x268.png" alt="" width="285" height="268" /></a></p>
<p>Above you&#8217;ll notice that there is a &#8220;Client connection&#8221; section.  These details should be automatically generated for you, but should refer to the connection details of your remote machine, as viewed from your local machine.  To explain, the settings you see here will be inserted into the generated RDP file that you will use from your local machine to connect to the remote machine.</p>
<p>Once you&#8217;ve filled in the details, hit &#8220;Save&#8221;, followed by &#8220;Create RDP file&#8230;&#8221;.  Save the resulting RDP file somewhere safe &#8211; you&#8217;ll need it in the next step!</p>
<h3>Step 7 &#8211; try it!</h3>
<p>We now need to copy the RDP file created by RemoteApp Tool in the previous step from our remote machine to our local machine.  You can do this by either copying it to a network share (as I did) or by using the drive sharing options built into RDP.</p>
<p>Once you have the RDP file on your local machine, run it!  You&#8217;ll be prompted by a few security boxes the first time you do this, so I&#8217;ll give a few screenshots and explain what&#8217;s going on.</p>
<p>When we first run the RDP session, we&#8217;re informed that the RemoteApp is unsigned.  That&#8217;s normal as we&#8217;ve generated this RemoteApp ourselves.  Click &#8220;Connect&#8221; to continue anyway.</p>
<p><a href="http://www.liquidstate.net/blog/wp-content/uploads/2012/01/RemoteAppTest1.png" rel="shadowbox[sbpost-860];player=img;" title="RemoteApp Usage 1"><img class="aligncenter size-medium wp-image-865" title="RemoteApp Usage 1" src="http://www.liquidstate.net/blog/wp-content/uploads/2012/01/RemoteAppTest1-285x190.png" alt="" width="285" height="190" /></a></p>
<p>Now we are warned that the remote computer we&#8217;re connecting to cannot be verified.  As the error message explains, this is normal if it is running a version of Windows prior to Vista, which ours is.  Hit &#8220;Yes&#8221; to continue.</p>
<p><a href="http://www.liquidstate.net/blog/wp-content/uploads/2012/01/RemoteAppTest2.png" rel="shadowbox[sbpost-860];player=img;" title="RemoteApp Usage"><img class="aligncenter size-medium wp-image-866" title="RemoteApp Usage" src="http://www.liquidstate.net/blog/wp-content/uploads/2012/01/RemoteAppTest2-285x176.png" alt="" width="285" height="176" /></a></p>
<p>Now we get asked for our login credentials.  Use the username and password of the account we created in Step 3.  In this example, the username is &#8220;Test&#8221; and the password is &#8220;Test&#8221;.  You may need to hit the &#8220;Use another account&#8221; button if the username is pre-populated to something else.</p>
<p><a href="http://www.liquidstate.net/blog/wp-content/uploads/2012/01/RemoteAppTest3.png" rel="shadowbox[sbpost-860];player=img;" title="RemoteApp Example"><img class="aligncenter size-medium wp-image-867" title="RemoteApp Example" src="http://www.liquidstate.net/blog/wp-content/uploads/2012/01/RemoteAppTest3-285x213.png" alt="" width="285" height="213" /></a></p>
<p>After a short delay, you should now see a XP version of Microsoft Notepad integrated right into your Windows 7 desktop.  You can drag it round, resize the window; just like a normal application!</p>
<p><a href="http://www.liquidstate.net/blog/wp-content/uploads/2012/01/RemoteAppTest4.png" rel="shadowbox[sbpost-860];player=img;" title="RemoteApp Example"><img class="aligncenter size-medium wp-image-868" title="RemoteApp Example" src="http://www.liquidstate.net/blog/wp-content/uploads/2012/01/RemoteAppTest4-285x110.png" alt="" width="285" height="110" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.liquidstate.net/blog/technology/using-remoteapp-with-vmware-esxi-in-7-easy-steps/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using the Windows CrashPlan Client to manage a headless Linux server</title>
		<link>http://www.liquidstate.net/blog/technology/crashplan-remote-gui/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=crashplan-remote-gui</link>
		<comments>http://www.liquidstate.net/blog/technology/crashplan-remote-gui/#comments</comments>
		<pubDate>Tue, 17 Jan 2012 23:02:11 +0000</pubDate>
		<dc:creator>Bryan</dc:creator>
				<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://www.liquidstate.net/blog/?p=836</guid>
		<description><![CDATA[If you&#8217;ve followed my post about backing up your home file server and how I backup my own server, then you&#8217;ll know I&#8217;m a big fan of CrashPlan.  My only complain is that CrashPlan was built with the assumption that the GUI would reside on the same machine as the backup engine.  However, with a little [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-full wp-image-825" title="CrashPlan" src="http://www.liquidstate.net/blog/wp-content/uploads/2012/01/crashplan.png" alt="" width="195" height="150" />If you&#8217;ve followed my post about <a title="Don’t forget to backup your home file server too!" href="http://www.liquidstate.net/blog/technology/dont-forget-to-backup-your-home-file-server-too/">backing up your home file server</a> and how I <a title="Installing CrashPlan on a headless Linux Server" href="http://www.liquidstate.net/blog/technology/installing-crashplan-on-a-headless-linux-server/">backup my own server</a>, then you&#8217;ll know I&#8217;m a big fan of <a title="CrashPlan Website" href="http://www.crashplan.com/" target="_blank">CrashPlan</a>.  My only complain is that CrashPlan was built with the assumption that the GUI would reside on the same machine as the backup engine.  However, with a little SSH magic, you can easily overcome this limitation.</p>
<p>For the uninitiated, CrashPlan comprises of two components:</p>
<ul>
<li><strong>CrashPlan Engine:</strong> This is always running from the moment you install CrashPlan and continues to run even if you log out. It is responsible for the actual backup functions</li>
<li><strong>CrashPlan Desktop:</strong> This runs the nice GUI desktop application that helps you configure and manage the CrashPlan Engine.</li>
</ul>
<p>Here at Liquidstate, we have a central file server that runs Linux.  Naturally, it doesn&#8217;t have X Windows installed and is operated as a headless server &#8211; much like the type you would deploy to a data centre in a corporate environment.  I have a PC running Windows 7 that I use for any serious work and an iPad for casual web browsing etc.  In this post, I&#8217;ll show you how you can use the CrashPlan Desktop running on Windows 7 to manage the CrashPlan Engine running on a seperate Linux server.</p>
<h2>Installation</h2>
<p>Before we begin, I&#8217;ll assume that you&#8217;ve followed my other post that covers <a title="Installing CrashPlan on a headless Linux Server" href="http://www.liquidstate.net/blog/technology/installing-crashplan-on-a-headless-linux-server/" target="_blank">installing CrashPlan on a headless Linux Server</a>.  I&#8217;ll also assume that you&#8217;ve downloaded and installed the CrashPlan software on your Windows 7 PC.  If you haven&#8217;t, then why not go do that now.</p>
<h2>Configure CrashPlan GUI to access a remote CrashPlan Engine</h2>
<p>We&#8217;re now going to reconfigure the CrashPlan Desktop installation on our Windows PC to access a different port which we&#8217;ll then redirect to the CrashPlan Engine instance running on our Linux Server.  Annoyingly, if you also have a CrashPlan Engine instance running on your Windows PC then you&#8217;ll need to add/remove (or comment/uncomment) this line each time you want to switch between them.  Note that the CrashPlan Engine is unaffected by changes to this text file &#8211; it will happily trundle along in the background, backing up files from your Windows PC.</p>
<p>Open the folder where you installed CrashPlan on your Windows PC. By default, this is in C:\Program Files\CrashPlan. Inside, you&#8217;ll find a folder called &#8220;conf&#8221; and inside there, a file called &#8220;ui.properties&#8221;. Open this file using a decent text editor like <a title="Notepad++" href="http://notepad-plus-plus.org/">Notepad++</a> and add the following line:<br />
<code>servicePort=4200</code></p>
<p>You might find that Notepad doesn&#8217;t show line breaks properly.  You may also notice that there&#8217;s already a line similar to the above that starts with &#8216;#&#8217;.  This means that line is commented out, so you have the choice of changing that line and removing the &#8216;#&#8217; (or just follow these instructions and add it at the bottom).</p>
<p>For reference, here is the content of my &#8220;ui.properties&#8221; file:<code><br />
#Fri Dec 09 09:50:22 CST 2005<br />
#serviceHost=127.0.0.1<br />
servicePort=4200<br />
#pollerPeriod=1000 # 1 second<br />
#connectRetryDelay=10000 # 10 seconds<br />
#connectRetryAttempts=3<br />
#showWelcome=true</code></p>
<p>#font.small=<br />
#font.default=<br />
#font.title=<br />
#font.message.header=<br />
#font.message.body=<br />
#font.tab=</p>
<h2>SSH Tunnelling</h2>
<p>If you&#8217;re running a Linux server, I expect you&#8217;ll already know how to use an SSH client like <a title="Putty" href="http://www.chiark.greenend.org.uk/~sgtatham/putty/" target="_blank">Putty</a> to open a Linux command shell from a remote Windows PC.  However, SSH tunneling might be new to you.  An SSH tunnel allows you to forward a specified local TCP port to a port on the remote machine.  In this example, we&#8217;ll create an SSH tunnel that fowards any traffic to port of our choosing on our Windows PC to port 4243 on our Linux server (the port that CrashPlan Engine uses to communicate).</p>
<p><img class="aligncenter" title="CrashPlan SSH Tunnel" src="http://www.liquidstate.net/blog/wp-content/uploads/2012/01/CrashPlan-SSH-Tunnel-570x283.png" alt="" width="570" height="283" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h2>Creating an SSH tunnel using Putty</h2>
<p>Download and install Putty if you don&#8217;t already have it installed. Open the program and:<img class="alignright size-thumbnail wp-image-838" title="Crashplan-Putty-1" src="http://www.liquidstate.net/blog/wp-content/uploads/2012/01/Crashplan-Putty-1-195x150.png" alt="" width="195" height="150" /></p>
<ul>
<li>Enter the Hostname (or IP address) of your Linux server.</li>
<li>Leave the Port field set to the default value of 22.</li>
<li>Leave the Connection Type set to the default value of &#8220;SSH&#8221;.</li>
<li>In the &#8220;Saved Sessions&#8221; field, type a name for this session, like &#8220;Crashplan&#8221;.</li>
<li>Hit the &#8220;Save&#8221; button.</li>
<li>Your session name should now appear in the list for future use.</li>
</ul>
<p>Now,<img class="alignright" title="Crashplan-Putty-2" src="http://www.liquidstate.net/blog/wp-content/uploads/2012/01/Crashplan-Putty-2-195x150.png" alt="" width="195" height="150" /></p>
<ul>
<li>In the left-hand pane, expand the &#8220;Connection&#8221; tab, followed by the &#8220;SSH&#8221; tab, and then select &#8220;Tunnels&#8221;.</li>
<li>Below where it says &#8220;Add new forwarded port:&#8221;, set the &#8220;Source port&#8221; field to 4200 and the &#8220;Destination&#8221; to &#8220;localhost:4243&#8243;.</li>
<li>You can leave the default settings &#8220;Local&#8221; and &#8220;Auto&#8221; as-is.</li>
<li>Hit the &#8220;Add&#8221; button to the right of the &#8220;Source port&#8221; field.</li>
<li>The list of &#8220;Forward ports&#8221; should now include a line that reads &#8220;L4200   localhost:4243&#8243;</li>
<li>To save the changes, in the left-hand pane, select the &#8220;Session&#8221; tab; ensure that the Host Name, Port, and &#8220;Saved Sessions&#8221; fields are how you left them; and hit the &#8220;Save&#8221; button.</li>
</ul>
<h2>Open the tunnel</h2>
<ul>
<li>Ensure that you&#8217;re looking at the &#8220;Session&#8221; tab by selecting it in the left-hand pane.</li>
<li>Ensure that the &#8220;Crashplan&#8221; session we saved earlier is loaded by selecting it from the list and hitting &#8220;Load&#8221;.</li>
<li>Hit the &#8220;Open&#8221; button at the bottom right of the window.</li>
<li>An Linux command shell will open, asking for your username and password.</li>
<li>After you&#8217;ve entered these, it will look and act like a normal remote session, but hidden behind the scenes is our SSH tunnel.</li>
</ul>
<h2>Connect to the remote CrashPlan Engine</h2>
<p>If you&#8217;ve already opened your SSH Tunnel, you should be able to launch the CrashPlan Desktop application on your Windows PC and it will connect through to the CrashPlan Engine instance running on your Linux PC.  If you get a connection error, make sure that you have edited the &#8220;ui.properties&#8221; file correctly;  that you entered the right port numbers in Putty; and that you have an open Putty session running in the background.</p>
<p style="text-align: center;"><img class="size-thumbnail wp-image-857 aligncenter" title="Crashplan-Putty-3" src="http://www.liquidstate.net/blog/wp-content/uploads/2012/01/Crashplan-Putty-3-195x150.png" alt="" width="195" height="150" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.liquidstate.net/blog/technology/crashplan-remote-gui/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Installing CrashPlan on a headless Linux Server</title>
		<link>http://www.liquidstate.net/blog/technology/installing-crashplan-on-a-headless-linux-server/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=installing-crashplan-on-a-headless-linux-server</link>
		<comments>http://www.liquidstate.net/blog/technology/installing-crashplan-on-a-headless-linux-server/#comments</comments>
		<pubDate>Mon, 16 Jan 2012 23:37:15 +0000</pubDate>
		<dc:creator>Bryan</dc:creator>
				<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://www.liquidstate.net/blog/?p=818</guid>
		<description><![CDATA[Installing CrashPlan is really easy.  The installer has its own (text-based) installation script that will fetch a copy of the latest software and pre-requisites, like a compatible Java Runtime Environment.  Once installed, the CrashPlan agent will automatically update itself when a new version becomes available. So, lets go ahead and download the software first.  At [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-full wp-image-825" title="CrashPlan" src="http://www.liquidstate.net/blog/wp-content/uploads/2012/01/crashplan.png" alt="" width="195" height="150" />Installing CrashPlan is really easy.  The installer has its own (text-based) installation script that will fetch a copy of the latest software and pre-requisites, like a compatible Java Runtime Environment.  Once installed, the CrashPlan agent will automatically update itself when a new version becomes available.<br />
So, lets go ahead and download the software first.  At the time writing, the below link was correct but you can find the latest release <a href="http://www.crashplan.com/consumer/download.html?os=Linux">here</a>.  Simply change the URL below if necessary:<br />
<code><br />
[root@server ~]# cd /tmp/<br />
[root@server tmp]#</code></p>
<p>[root@server tmp]# wget http://download.crashplan.com/installs/linux/install/CrashPlan/CrashPlan_3.0.3_Linux.tgz<br />
[root@server tmp]#<br />
[root@server tmp]# tar -xzf CrashPlan_*_Linux.tgz</p>
<p>Lets just quickly check that your system has some of the basic tools that the installation script depends on, and install them if necessary.<br />
<code><br />
[root@server tmp]# yum install grep sed cpio gzip coreutils<br />
</code></p>
<p>Now lets run the installer and I&#8217;ll walk you through a typical installation:<br />
<code><br />
[root@server tmp]# ./install.sh<br />
Welcome to the CrashPlan Installer.</code></p>
<p>Press enter to continue with installation.</p>
<p>As it suggests, press your &#8216;Enter&#8217; key to continue with the installation. CrashPlan will now check your system to make sure you&#8217;ve got the necessary pre-requisite programs installed. We&#8217;ve checked this above already, so you should fly through this check.<br />
<code><br />
Validating environment…<br />
detected root permissions<br />
</code></p>
<p>You&#8217;ll notice that I&#8217;ve chosen to install CrashPlan using the &#8216;root&#8217; account, giving it full access to all my data.  The installer will also let you install using a non-privileged user, but then the agent will only be able to back up files that are readable by that user. If you&#8217;d prefer to have a more secure system and are happy with managing this limitation, just quit the installer by pressing Ctrl+C; change to the user you would like to install as and then start again from the beginning of this post.</p>
<p>CrashPlan is written in Java and requires a valid Sun JRE or OpenJDK. If you already have it installed CrashPlan will use it, otherwise, you&#8217;ll be asked if you would like to download a dedicated copy for CrashPlan. This is my preferred method as it means that CrashPlan is self-contained.<br />
<code><br />
No Java VM could be found in your path<br />
Would you like to download the JRE and dedicate it to CrashPlan? (y/n) [y]<br />
</code></p>
<p>The next step is to accept the EULA (yawn)<br />
<code><br />
You must review and agree to the EULA before installation.</code></p>
<p>Press enter to read the EULA.<br />
&#8230;<br />
&#8230;<br />
&#8230;<br />
Do you accept and agree to be bound by the EULA? (yes/no) yes</p>
<p>Now we need to set our installation path and enter a few configuration parameters. The installer will suggest hopefully useful defaults. You&#8217;ll notice I&#8217;ve changed the location of where CrashPlan should store backups.<br />
<code><br />
What directory do you wish to install CrashPlan to? [/usr/local/crashplan]<br />
/usr/local/crashplan does not exist. Create /usr/local/crashplan? (y/n) [y]</code></p>
<p>What directory do you wish to link the CrashPlan executable to? [/usr/local/bin]</p>
<p>What directory do you wish to store backups in? [/usr/local/var/crashplan] /mnt/backupdata<br />
/mnt/backupdata does not exist. Create /mnt/backupdata? (y/n) [y]</p>
<p>What directory contains your SYSV init scripts? [/etc/init.d]</p>
<p>What directory contains your runlevel init links? [/etc/rc3.d]</p>
<p>Your selections:<br />
CrashPlan will install to: /usr/local/crashplan<br />
And put links to binaries in: /usr/local/bin<br />
And store datas in: /mnt/backupdata<br />
Your init.d dir is: /etc/init.d<br />
Your current runlevel directory is: /etc/rc3.d</p>
<p>Is this correct? (y/n) [y]</p>
<p>Have a quick check over your selection and then type &#8216;Y&#8217; if you&#8217;re happy to install the software.<br />
<code><br />
Unpacking /./CrashPlan_3.0.3.cpi …<br />
29808 blocks<br />
Starting CrashPlan Engine … OK</code></p>
<p>CrashPlan has been installed and the Service has been started automatically.</p>
<p>Press Enter to complete installation.</p>
<p>Important directories:<br />
Installation:<br />
/usr/local/crashplan<br />
Logs:<br />
/usr/local/crashplan/log<br />
Default archive location:<br />
/mnt/backupdata</p>
<p>Start Scripts:<br />
sudo /usr/local/crashplan/bin/CrashPlanEngine start|stop<br />
/usr/local/crashplan/bin/CrashPlanDesktop</p>
<p>Excellent! That should now be the CrashPlan Engine/Agent installed and running. Now the installer is going to ask about installing the Desktop UI, which we will decline as this guide is about setting up a headless server. Instead, we&#8217;ll use port forwarding and a little configuration file editing to control this CrashPlan Engine from our Windows desktop instead.<br />
<code><br />
You can run the CrashPlan Desktop UI locally as your own user or connect<br />
a remote Desktop UI to this Service via port-forwarding and manage it<br />
remotely. Instructions for remote management are in the readme files<br />
placed in your installation directory:<br />
/usr/local/crashplan/doc</code></p>
<p>Would you like to start CrashPlanDesktop? (y/n) [y] n</p>
<p>Installation is complete. Thank you for installing CrashPlan for Linux.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.liquidstate.net/blog/technology/installing-crashplan-on-a-headless-linux-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Don&#8217;t forget to backup your home file server too!</title>
		<link>http://www.liquidstate.net/blog/technology/dont-forget-to-backup-your-home-file-server-too/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=dont-forget-to-backup-your-home-file-server-too</link>
		<comments>http://www.liquidstate.net/blog/technology/dont-forget-to-backup-your-home-file-server-too/#comments</comments>
		<pubDate>Sun, 15 Jan 2012 11:46:32 +0000</pubDate>
		<dc:creator>Bryan</dc:creator>
				<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://www.liquidstate.net/blog/?p=813</guid>
		<description><![CDATA[I recently had an interesting chat with my wife about prized belongings.  If there was a fire in our house and we could only grab one (materialistic) thing as we ran for the door, what would it be?  The answer surprised me: &#8220;your server thingy&#8221;. As with most geek homes, we have a computer that acts [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-full wp-image-828" title="Burning Hard Disk" src="http://www.liquidstate.net/blog/wp-content/uploads/2012/01/burningdisk.png" alt="" width="195" height="150" />I recently had an interesting chat with my wife about prized belongings.  If there was a fire in our house and we could only grab one (materialistic) thing as we ran for the door, what would it be?  The answer surprised me: <em><strong>&#8220;your server thingy&#8221;</strong></em>.</p>
<p>As with most geek homes, we have a computer that acts as a central file server (among other things).   On there we have music, movies, books, photos and our own home directories that contain a multitude of random things.  The idea is that we should be able to pick up any device in the house (PC, laptop, iPad, iPhone) and get access to our data.  It also means that if a particular device should fail or need rebuilt, then its an easy job.  Lovely.</p>
<p>However, what I hadn&#8217;t necessarily appreciated was how important that little server had become in our lives.  What originally started off as a place to store music and movies now has our financial info, wedding photos, videos of our kids&#8217; first steps, and a heap of other memories &#8211; something that no insurance policy can replace.</p>
<p>So, it was time to practice at home what I preach at work!  We already had a (Un)RAID setup to provide an easy method of future expansion and cost-effective protection against disk failure, but that&#8217;s off little use in the event of a fire/flood/theft.  So, after some discussion with the client (my wife) and following my own <a title="Basic Business Continuity" href="http://www.liquidstate.net/blog/technology/business-continuity/">advice</a>, I estimated our Recovery Point Objective (RPO) should be measured in days and our Recovery Time Objective (RTO) to be measured in months.  In other words, in the event of a disaster we don&#8217;t really mind how long it takes to get our data back as long as we can, and that the backup is reasonably up to date.</p>
<p>Enter CrashPlan. CrashPlan is a piece of backup software that runs on Windows, Mac, Linux and Solaris and lets you backup your data off-site to removable hard disks, computers belonging to friends and family or to CrashPlan&#8217;s own &#8220;cloud&#8221; backup solution.  The software tracks changes to files in realtime and backup data is encrypted before it leaves your computer.  You&#8217;ll receive regular emails giving you a summary of your backups, as well as a warning if any computer has failed to backup for a few days.  And, the software will automatically update itself when new versions are available.  However, best of all, <em><strong>&#8220;it just works!&#8221;</strong></em>.</p>
<p><a href="http://www.liquidstate.net/blog/wp-content/uploads/2012/01/crashplan-report.png" rel="shadowbox[sbpost-813];player=img;" title="CrashPlan Report"><img class="aligncenter size-medium wp-image-814" title="CrashPlan Report" src="http://www.liquidstate.net/blog/wp-content/uploads/2012/01/crashplan-report-285x77.png" alt="" width="285" height="77" /></a></p>
<p>I&#8217;ve been using CrashPlan for over a year now and I must say that my experience has been excellent.  The software is easy to install (including Linux) and there&#8217;s plenty of technical information and how-to&#8217;s on the CrashPlan website.  My only niggle was that the software assumes that you&#8217;ll have a graphical user interface, which my Linux server does not.  I&#8217;ll cover how to get around this limitation very easily in a later post.</p>
<p>My advice to you all is go do it now.  No, really, now.  It&#8217;ll take you ten minutes.  Download the CrashPlan client, sign up for a trial of their online backup service and then once you&#8217;re data is uploaded, you&#8217;re safe and you can practically forget about it.  You&#8217;ve probably thought about backups a few times but its always relegated to the &#8220;later&#8221; pile.  If you&#8217;ve read this post and (heavens forbid) you do have a home-based disaster, you&#8217;re really going to kick yourself.  So, go on, go do it now &#8230; I&#8217;ll even give you the <a title="Download CrashPlan" href="http://www.crashplan.com/consumer/download.html" target="_blank">link</a>!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.liquidstate.net/blog/technology/dont-forget-to-backup-your-home-file-server-too/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Enabling NTLM Authentication (Single Sign-On) in Firefox</title>
		<link>http://www.liquidstate.net/blog/technology/enabling-ntlm-authentication-single-sign-on-in-firefox/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=enabling-ntlm-authentication-single-sign-on-in-firefox</link>
		<comments>http://www.liquidstate.net/blog/technology/enabling-ntlm-authentication-single-sign-on-in-firefox/#comments</comments>
		<pubDate>Tue, 01 Nov 2011 20:45:36 +0000</pubDate>
		<dc:creator>Bryan</dc:creator>
				<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://www.liquidstate.net/blog/?p=781</guid>
		<description><![CDATA[&#160; If like me you use Firefox within a corporate environment, you perhaps repeatedly get prompted for your username and password when you use internal web applications whereas Internet Explorer just lets you log right in using Single Sign-On (SSO).  Some people don&#8217;t realize it, but Firefox is capable of NTLM authentication (Windows pass-through), just [...]]]></description>
			<content:encoded><![CDATA[<p>&nbsp;</p>
<p><a href="http://www.liquidstate.net/blog/technology/enabling-ntlm-authentication-single-sign-on-in-firefox/attachment/login/" rel="attachment wp-att-786" title="Login Prompt"><img class="alignright size-full wp-image-786" title="Login Prompt" src="http://www.liquidstate.net/blog/wp-content/uploads/2011/11/login.png" alt="" width="195" height="150" /></a>If like me you use Firefox within a corporate environment, you perhaps repeatedly get prompted for your username and password when you use internal web applications whereas Internet Explorer just lets you log right in using Single Sign-On (SSO).  Some people don&#8217;t realize it, but Firefox is capable of NTLM authentication (Windows pass-through), just like Internet Explorer &#8211; all you need to do is tell it for which sites it should permit NTLM.</p>
<p>Firefox and others in the Mozilla family acheives this through what it calls <a title="Integrated Authentication" href="https://developer.mozilla.org/en/Integrated_Authentication" target="_blank">integrated authentication</a> that entails support for the the Simple and Protected GSS-API Negotiation Mechanism (SPNEGO) internet standard (<a title="http://tools.ietf.org/html/rfc2478" href="http://tools.ietf.org/html/rfc2478" rel="external" target="_blank">RFC 2478</a>) to negotiate either NTLM, Kerberos, or other authentication protocols supported by the operating system, leveraging system libraries that provide SPNEGO: SSPI on Microsoft Windows, and GSS-API on Linux, Mac OSX, and other UNIX-like systems.</p>
<p>So, that&#8217;s great, but how do you do it?</p>
<h2>Method 1 &#8211; Do it yourself!</h2>
<ul>
<li>Open Firefox and type <code>about:config</code> in the address bar.</li>
<li>You will be prompted with a warning &#8211; click the &#8220;I&#8217;ll be careful, I promise!&#8221; button.</li>
</ul>
<p><a href="http://www.liquidstate.net/blog/wp-content/uploads/2011/11/Firefox-here-be-dragons.png" rel="shadowbox[sbpost-781];player=img;" title="Firefox - Here Be Dragons"><img class="aligncenter size-medium wp-image-782" title="Firefox - Here Be Dragons" src="http://www.liquidstate.net/blog/wp-content/uploads/2011/11/Firefox-here-be-dragons-285x186.png" alt="" width="285" height="186" /></a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<ul>
<li>Use the ‘Filter’ field to find the <code>network.automatic-ntlm-auth.trusted-uris</code> configuration parameter</li>
<li>Double-click the name of the configuration parameter</li>
<li>Enter the URLs of the sites you wish to enable NTLM authentication for in the form:</li>
<ul>
<li><code>http://intranet,http://sharepoint</code></li>
</ul>
<li>Note that we only include the <code>http://</code> prefix and then the hostname of the server; there is no trailing slash nor a path to any particular page.  Authentication is enabled on a per-site basis.</li>
</ul>
<p><a href="http://www.liquidstate.net/blog/wp-content/uploads/2011/11/firefox-ntlm.png" rel="shadowbox[sbpost-781];player=img;" title="Firefox - Enable NTLM"><img class="aligncenter size-medium wp-image-783" title="Firefox - Enable NTLM" src="http://www.liquidstate.net/blog/wp-content/uploads/2011/11/firefox-ntlm-285x185.png" alt="" width="285" height="185" /></a><br />
&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<ul>
<li>Now, when you go to the websites listed, you should be logged on using your Windows credentials through NTLM.</li>
</ul>
<h2>Method 2 &#8211; Use an extension!</h2>
<p>If you don&#8217;t want to open up the about:config page whenever you come across a site that you&#8217;d like to add NTLM authentication, then as you would expect, someone has written a Firefox Extension called <a title="Integrated Authentication for Firefox" href="https://addons.mozilla.org/en-US/firefox/addon/integrated-auth-for-firefox/" target="_blank">Integrated Authentication for Firefox</a> that provides a simple interface to add and remove entries.  Install the Extension, restart Firefox, and then in your Tools menu, you will find a new option called <code>Integrated Authentication Sites</code> that will open up a simple dialog box that lets you add or remove entries. As per the manual method, note that you should only include the <code>http://</code> prefix and the hostname of the server; there is no trailing slash nor a path to any particular page. Authentication is enabled on a per-site basis.</p>
<p><a href="http://www.liquidstate.net/blog/wp-content/uploads/2011/11/firefox-ntlm-extension.png" rel="shadowbox[sbpost-781];player=img;" title="NTLM Extension for Firefox"><img class="aligncenter size-medium wp-image-785" title="NTLM Extension for Firefox" src="http://www.liquidstate.net/blog/wp-content/uploads/2011/11/firefox-ntlm-extension-285x268.png" alt="" width="285" height="268" /></a></p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.liquidstate.net/blog/technology/enabling-ntlm-authentication-single-sign-on-in-firefox/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Basic Business Continuity</title>
		<link>http://www.liquidstate.net/blog/technology/business-continuity/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=business-continuity</link>
		<comments>http://www.liquidstate.net/blog/technology/business-continuity/#comments</comments>
		<pubDate>Sat, 29 Oct 2011 22:20:24 +0000</pubDate>
		<dc:creator>Bryan</dc:creator>
				<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://www.liquidstate.net/blog/?p=757</guid>
		<description><![CDATA[The topic of Business Continuity isn&#8217;t exactly the most riveting topic in the world, but its an area of IT that&#8217;s close to my heart and one that seems to be regularly forgotten, misunderstood, or simply just poorly implemented.  After working with a variety of organisations, the problem appears to me to just be a [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.liquidstate.net/blog/technology/business-continuity/attachment/disaster1-300x235-2/" rel="attachment wp-att-772" title="Disaster"><img class="size-full wp-image-772 alignright" title="Disaster" src="http://www.liquidstate.net/blog/wp-content/uploads/2011/10/disaster1-300x2351.jpg" alt="" width="195" height="150" /></a>The topic of Business Continuity isn&#8217;t exactly the most riveting topic in the world, but its an area of IT that&#8217;s close to my heart and one that seems to be regularly forgotten, misunderstood, or simply just poorly implemented.  After working with a variety of organisations, the problem appears to me to just be a lack of communication between those running the business and the technical staff responsible for the implementation and maintainance of the mechanisms that greatly influence the potential of a disaster occuring, the time taken to recover from it, and ultimately, the overall impact to the business.  All too often, heads are buried in the sand until there&#8217;s a disaster and then there&#8217;s hell to pay!</p>
<blockquote><p>Business continuity is not something implemented at the time of a disaster; Business Continuity refers to those activities performed daily to maintain service, consistency, and recoverability.</p></blockquote>
<p>So, where do you start?  Well, firstly, the field of Business Continuity is huge, but the purpose of this post is to give enough information for you to go do something.  By all means, once you&#8217;ve got the basics sorted, then by all means go read up further &#8211; but right now, lets just focus on understanding the basic concepts, learning some of the jargon, and some helpful hints to convince people in your company that there&#8217;s more to Business Continuity than having some backup tapes in a cupboard!</p>
<h2>Business Continuity? Disaster Recovery?</h2>
<p>Understanding what you&#8217;re doing is important, but all too often I&#8217;ve seen organisations spend far too much time debating what they mean by Business Continuity, rather than agreeing some basic terms and getting on with it!  <em><strong></strong></em>In this post, we&#8217;ll work on the principle that Disaster Recovery is the act of preparing for recovery or continuation of critical IT components after a disaster (natural or otherwise) and that Business Continuity is the larger process of ensuring that all aspects of the business keep functioning.  For example, a Business Continuity Plan might involve identifying the risks faced by critical business functions and identifying the IT components they rely upon.  Meanwhile, Disaster Recovery is focussed on ensuring that there&#8217;s sufficient fault tolerance and backups to meet the requirements of the Business Continuity Plan.</p>
<h2>What do I need to do?</h2>
<p>Your manager might prefer you call it a <strong>Business Impact Assessment (BIA)</strong>, but I&#8217;d suggest you probably need to identify all the business functions within your organisation, assign each a level of importance and then work out what IT components these systems depend on.  You can make this job as big and as complicated as you like, but at the end the day, you need to gain agreement with the business about what&#8217;s important to <em>them</em>.  The two fundamental measurements in Business Continuity are the:</p>
<ul>
<li><strong>Recovery Time Objective (RTO):</strong>  How quickly must we restore a business function after a disruption or disaster before it causes &#8220;unacceptable consequences&#8221; to the business.</li>
<li><strong>Recovery Point Objective (RPO):</strong>  The maximum window of time before a disruption or disaster during which data may be lost.</li>
</ul>
<p>The usual mistake is that IT ask the business what level of &#8220;uptime&#8221; is required and how much data loss is acceptable.  Of course, the answer is almost always &#8220;100% uptime with zero data loss&#8221; &#8211; usually without any real understanding of what that might involve either technically or financially!  A useful way of getting the facts is to ask the question in a different way:</p>
<blockquote><p>If we had a major disaster right now, how long would our business survive without this particular business function?  An hour?  A day?  A week?  What would the impact be if we lost the last minute of transactions?  What about the last hour?  The last day?</p></blockquote>
<p>Now all you have to do is review the IT components that each business function depends upon and ensure you can meet the agreed <strong>Recovery Time Objective (RTO)</strong> and <strong>Recovery Point Objective (RPO)</strong>.  That might sound like a cop out, but there&#8217;s a vast array of documented solutions out there for introducing fault tolerance to an IT system.  However, its very likely that you&#8217;ll need to take a serious look at how quickly you could recover from a disaster.  Also, once you&#8217;ve identified a critical business function and analysed all the IT components it depends on, you&#8217;ll often find out that there&#8217;s some long forgotten line-of-business application that&#8217;s sitting on a single ancient server in the corner of the server room that turns out to be critical to the success of the business!</p>
<h2>Why should I go to all this hassle?</h2>
<p>From an IT perspective, the key purpose of the Business Impact Assessment is to understand the real requirements of the business in terms of fault tolerance and data backups.  More importantly, done right, its an opportunity to clearly document the expectations of the business in a measurable fashion.  This empowers the IT team to:</p>
<ul>
<li>Correctly design IT systems to ensure they have &#8220;sufficient and necessary&#8221; levels of fault tolerance.</li>
<li>Put the right backup mechanisms and schedules in place to ensure you can recover from a disaster.</li>
<li>Justify the IT costs associated with additional servers, storage, vendor support contracts, etc.</li>
<li>Sleep sound at night knowing that if disaster does strike, then you have it in black &amp; white what was expected of you.</li>
</ul>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.liquidstate.net/blog/technology/business-continuity/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Logitech Squeezebox</title>
		<link>http://www.liquidstate.net/blog/technology/logitech-squeezebox/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=logitech-squeezebox</link>
		<comments>http://www.liquidstate.net/blog/technology/logitech-squeezebox/#comments</comments>
		<pubDate>Thu, 27 Oct 2011 19:17:39 +0000</pubDate>
		<dc:creator>Bryan</dc:creator>
				<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://www.liquidstate.net/blog/?p=715</guid>
		<description><![CDATA[Here at Liquidstate, we have a growing family of Logitech Squeezebox devices. For those that don&#8217;t know, Squeezebox is a range of network music players originally from Slim Devices, who were aquired by Logitech.  Much like their more expensive and arguably more popular Sonos counterparts, the Squeezebox devices can play Internet radio, digital audio streamed [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-full wp-image-718" title="Squeezebox Menu" src="http://www.liquidstate.net/blog/wp-content/uploads/2011/10/squeezebox_menu.jpg" alt="" width="195" height="150" />Here at Liquidstate, we have a growing family of Logitech Squeezebox devices. For those that don&#8217;t know, Squeezebox is a range of network music players originally from Slim Devices, who were aquired by Logitech.  Much like their more expensive and arguably more popular <a title="Sonos" href="http://www.sonos.com/" target="_blank">Sonos</a> counterparts, the Squeezebox devices can play Internet radio, digital audio streamed across your home network, and will stream a variety of music services such as Pandora, Napster, Last.fm, Spotify, etc.  The end user experience is a little less polished, but at almost half the price and the benefit of backing from an open source community, I don&#8217;t mind putting in a little bit of my own time!</p>
<h2>Squeezebox Server</h2>
<p>Squeezebox Server (formerly SlimServer and SqueezeCenter) is the streaming audio server software developed to stream music over your home network, allowing you to play your music collection to both software and hardware receivers (namely, the Squeezebox range).  It&#8217;s written in Perl and will run on Linux, Microsoft Windows, Apple Macintosh, and BSD platforms.  It supports a large number of audio formats including MP3, FLAC, WAV, Ogg, and AAC, as well as transcoding.  Best of all, Squeezebox Server is open source and plugins from Logitech and the community allow additional functionality to be added, such as the live radio and &#8216;listen-again&#8217; features of <a title="BBC iPlayer" href="http://en.wikipedia.org/wiki/BBC_iPlayer">BBC iPlayer</a>.</p>
<p>Here at Liquidstate, we have Squeezebox Server running on a CentOS Linux server (virtualised, of course!).  Logitech very gratiously provide a yum repository making installation on any RedHat-based system remarkably easy:</p>
<pre># Install the yum repository
rpm -Uvh <a title="http://repos.slimdevices.com/yum/squeezecenter/squeezecenter-repo-1-6.noarch.rpm" href="http://repos.slimdevices.com/yum/squeezecenter/squeezecenter-repo-1-6.noarch.rpm" rel="nofollow">http://repos.slimdevices.com/yum/squeezecenter/squeezecenter-repo-1-6.noarch.rpm</a>

# Install Squeezebox Server (and any dependencies via yum)
yum install squeezeboxserver</pre>
<p>Now, just go to <a title="http://YOUR_SERVER:9000" href="http://your_server:9000/" rel="nofollow" target="_blank">http://YOUR_SERVER:9000</a> and you can scan your music libary as well as configure and control any squeezebox devices on your network &#8211; all through a nice web interface.  Easy huh?</p>
<p><a href="http://www.liquidstate.net/blog/wp-content/uploads/2011/10/logitech-squeezebox-server.jpg" rel="shadowbox[sbpost-715];player=img;" title="Squeezebox Server"><img class="aligncenter size-medium wp-image-719" title="Squeezebox Server" src="http://www.liquidstate.net/blog/wp-content/uploads/2011/10/logitech-squeezebox-server-285x176.jpg" alt="" width="285" height="176" /></a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h2>Squeezebox Boom</h2>
<p>Our Squeezebox journey started with looking for an iPod/iPhone dock to use in our kitchen.  However, we wanted the device out of the way, which would most probably mean a stereo with third party iPhone dock attached through line-in.  Of course, we also wanted the dock to charge whatever was plugged into it and not before long, it all seemed a bit complicated.</p>
<p><a href="http://www.liquidstate.net/blog/wp-content/uploads/2011/10/logitech-squeezebox-boom.jpg" rel="shadowbox[sbpost-715];player=img;" title="Squeezebox Boom"><img class="alignright size-thumbnail wp-image-716" title="Squeezebox Boom" src="http://www.liquidstate.net/blog/wp-content/uploads/2011/10/logitech-squeezebox-boom-195x150.jpg" alt="" width="195" height="150" /></a>Enter the Squeezebox Boom, a self-contained device with an LCD display, front panel controls, 30W integrated amplifier, bi-amped stereo two-way speakers, 3.5mm line in, 3.5mm line out for a subwoofer as well as both wired and wireless network adapters.  It&#8217;s very easy to set up and you&#8217;ll be up and running in no time.  The sound quality is pretty good &#8211; probably not as good as the Bose iPod dock we have, but definitely good enough.  Technical details about the &#8220;careful and innovative acoustic design&#8221; can be found in this <a title="Logitech Squeezebox Boom Audio Design.pdf" href="http://wiki.slimdevices.com/uploads/a/ad/Logitech_Squeezebox_Boom_Audio_Design.pdf">white paper</a>.</p>
<p>So now, we can listen to Internet radio, play music from our NAS device, or stream music from Last.FM or Spotify (requires a premium account).  The Boom comes with its own (basic) remote control, but we can also exercise full control using an iPhone app.  Nice!</p>
<h2>Squeezebox Receiver</h2>
<p><a href="http://www.liquidstate.net/blog/wp-content/uploads/2011/10/logitech-squeezebox-receiver.jpg" rel="shadowbox[sbpost-715];player=img;" title="Squeezebox Receiver"><img class="alignleft size-thumbnail wp-image-727" title="Squeezebox Receiver" src="http://www.liquidstate.net/blog/wp-content/uploads/2011/10/logitech-squeezebox-receiver-195x150.jpg" alt="" width="195" height="150" /></a>The Squeezebox Receiver is designed to be used in conjunction with your stereo.  It has Digital optical, coax and analog connectors with a 24-bit Wolfson DAC.  Just like the Squeezebox Boom, it can play a variety of music formats ans has built-in 802.11b/g wireless network adapter and a 10/100Mbps Ethernet port.</p>
<p>Setting up the Squeezebox Receiver is a little more fiddly due to the lack of controls and requires the use of the Squeezebox Controller, which comes with the Receiver as part of the Squeezebox Duet package.  I found the supplied User Guide to be absolutely terrible, so below is some information you might find useful if you run into any problems.</p>
<p>The Squeezebox Receiver has one button with a TricolorLED behind it.</p>
<p><strong>Button Usage</strong></p>
<ul>
<li>To put Squeezebox Receiver into setup mode, press and hold the button for about 3 seconds or until it blinks slow <span style="color: #ff0000;"><strong>red</strong></span> then release it.</li>
<li>To do a factory reset on Squeezebox Receiver, continue holding for a total of 6 seconds until it starts blinking fast <span style="color: #ff0000;"><strong>red</strong></span>. Release and after factory reset, it will start flashing slower and be ready to set up.</li>
<li>If you press and hold the button while plugging in the Receiver, you&#8217;ll see the button sequence through a series of colors and a set of ascending test tones will be played through the audio outputs.</li>
<li>When connected to Squeezebox Server, the button is <span style="color: #c0c0c0;"><strong>white</strong></span>, and you can press it to pause the music. Press again to start the music up again.</li>
</ul>
<p><strong>Colour Codes</strong></p>
<ul>
<li>a <span style="color: #ff0000;"><strong>solid red light</strong></span> means the device is booting up.</li>
<li>a <span style="color: #ff0000;"><strong>slow blinking red light</strong></span> means the device is awaiting to be setup (see below regarding fast blinking).</li>
<li>a <span style="color: #ffff00;"><strong>yellow light</strong></span> means the device is waiting for wireless to connect (and the ethernet link is down).</li>
<li>a <span style="color: #00ff00;"><strong>green light</strong></span> means the network is connected and the device is waiting for an IP address to be assigned via DHCP (this step is skipped if using static IP).</li>
<li>a <span style="color: #3366ff;"><strong>blue light</strong></span> means the device is waiting to connect to Squeezebox Server or mysqueezebox.com.</li>
<li>a <span style="color: #c0c0c0;"><strong>solid white light</strong></span> means the device has successfully connected to Squeezebox Server or mysqueezebox.com and is ready for use.</li>
<li>a <span style="color: #c0c0c0;"><strong>fast blinking white light</strong></span> means that a firmware update is in progress.</li>
<li>a <span style="color: #ff0000;"><strong>fast blinking red light</strong></span> means that a Factory Reset and xilinx update is in progress.</li>
<li>a <span style="color: #ff00ff;"><strong>purple light</strong></span> is bad news and means the device has an error &#8211; it will blink a number of times, followed by a one second pause between.</li>
</ul>
<p><strong>Error Codes</strong></p>
<ul>
<li> <span style="color: #ff00ff;"><strong>1 purple blink</strong></span> indicates that the MAC address is missing or bad (checked second upon boot-up).</li>
<li><span style="color: #ff00ff;"><strong>2 purple blinks </strong></span>indicates that the wireless card is missing or bad (checked first upon boot-up).</li>
<li><span style="color: #ff00ff;"><strong>3 purple blinks</strong></span> indicates an SNV failure or error.</li>
<li><span style="color: #ff00ff;"><strong>4 purple blinks</strong></span> indicates an upgrade error.</li>
<li><span style="color: #ff00ff;"><strong>5 purple blinks</strong></span> indicates an CPLD XSVF file open error (xilinx file).</li>
<li><span style="color: #ff00ff;"><strong>6 purple blinks</strong></span> indicates that the UID is not set or all zeros (checked third upon boot-up).</li>
</ul>
<h2>Control using the Squeezebox Controller</h2>
<p><a href="http://www.liquidstate.net/blog/wp-content/uploads/2011/10/logitech-squeezebox-controller.jpg" rel="shadowbox[sbpost-715];player=img;" title="Squeezebox Controller"><img class="alignleft size-thumbnail wp-image-728" title="Squeezebox Controller" src="http://www.liquidstate.net/blog/wp-content/uploads/2011/10/logitech-squeezebox-controller-195x150.jpg" alt="" width="195" height="150" /></a>The Squeezebox Controller is a handheld remote controller with a 2.4 inch LCD TFT display that lets you control any Squeezebox device.  Like the other devices, it communicates with your Squeezebox Server over wireless using a built-in 802.11b/g wireless network adapter.</p>
<p>A little known feature of the Squeezebox Controller is its ability to also act as a client, capable of streaming music over wireless just like the other devices in the Squeezebox range.  This feature is still in beta and has to be enabled through the advanced options.</p>
<p>Local playback is enabled through <code>Settings-&gt;Advanced-&gt;Audio Playback</code> menu option:<br />
<a href="http://www.liquidstate.net/blog/wp-content/uploads/2011/10/logitech-controller-audio-setup.png" rel="shadowbox[sbpost-715];player=img;" title="Enabling local audio playback with Squeezebox Controller"><img class="size-medium wp-image-729 aligncenter" title="Enabling local audio playback with Squeezebox Controller" src="http://www.liquidstate.net/blog/wp-content/uploads/2011/10/logitech-controller-audio-setup-285x190.png" alt="" width="285" height="190" /></a><br />
&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><a href="http://www.liquidstate.net/blog/wp-content/uploads/2011/10/logitech-controller-audio-select.png" rel="shadowbox[sbpost-715];player=img;" title="Selecting audio device with Squeezebox Controller"><img class="size-thumbnail wp-image-730 alignleft" title="Selecting audio device with Squeezebox Controller" src="http://www.liquidstate.net/blog/wp-content/uploads/2011/10/logitech-controller-audio-select-195x150.png" alt="" width="195" height="150" /></a>Once enabled, you will find an extra option in the &lt;code&gt;Choose Player&lt;/code&gt; menu called &lt;code&gt;Controller&lt;/code&gt;.  Alternatively, if you plug headphones into the controller&#8217;s 3.5mm jack, it should automatically choose local playback for you.</p>
<p>If you have problems selecting between the headphone jack or internal speaker, you can try installing this <a title="third party app" href="http://www.stagessound.de/bluegaspode.xml" rel="nofollow" target="_blank">third party app</a> on to your Squeezebox Controller.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h2>Control using your iPhone/iPad or Android</h2>
<p>There are a number of options available to you if you want to control your Squeezebox devices from your iPhone, iPad or Android smartphone/tablet.</p>
<ul>
<li>The <a title="Squeezebox Controller App" href="http://itunes.apple.com/us/app/logitech-squeezebox-controller/id431302899?mt=8" target="_blank">Squeezebox Controller App</a> from Logitech is a free smartphone / tablet app to control your Squeezebox devices.  You should be able to find it in the Apple App Store or Android Marketplace by searching for &#8216;Logitech&#8217; or &#8216;Squeezebox&#8217;.</li>
<li>The <a title="iPeng iPhone Plugin for Squeezebox Server" href="http://penguinlovesmusic.de/ipeng-the-iphone-webapp-for-squeezecenter/" target="_blank">iPeng iPhone Plugin for Squeezebox Server</a> is a free third party plugin for Squeezebox Server that provides a web interface that is optimized for iPhone’s Safari browser and is also supported by Android’s Chrome.  The iPeng plugin still works but due to the small number of users still downloading it, it is less well supported.</li>
<li>Finally, the <a title="iPeng iPhone App" href="http://penguinlovesmusic.de/ipeng-the-iphone-skin-for-squeezecenter/" target="_blank">iPeng iPhone App</a> is a commercial third party app available from the <a title="iPeng iPhone App" href="http://itunes.apple.com/app/ipeng-for-ipad/id396993109?mt=8" target="_blank">Apple App Store</a> for both iPhone and iPad.  Although it costs a few quid, it provides a fast, slick interface that is more powerful than the stock Logitech App.  For example, the app can be used to synchronise playback between multiple Squeezebox devices, letting you play the same music in multiple rooms.  An in-app purchase will also let you stream music directly to your iPhone.</li>
</ul>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.liquidstate.net/blog/technology/logitech-squeezebox/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Using Disk Labels</title>
		<link>http://www.liquidstate.net/blog/technology/using-disk-labels/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=using-disk-labels</link>
		<comments>http://www.liquidstate.net/blog/technology/using-disk-labels/#comments</comments>
		<pubDate>Tue, 11 Oct 2011 13:54:42 +0000</pubDate>
		<dc:creator>Bryan</dc:creator>
				<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://www.liquidstate.net/blog/?p=700</guid>
		<description><![CDATA[In linux, hard drives are referred to as devices and are represented as pseudo files in /dev. For example, the first partition of the second lowest numbered SCSI drive is /dev/sdb1. If the drive referred to as /dev/sda is removed, then the remaining partition is automatically renamed /dev/sda1 at reboot, which can potentially cause your [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.liquidstate.net/blog/technology/using-disk-labels/attachment/label/" rel="attachment wp-att-706" title="PartitionLabel"><img class="alignright size-full wp-image-706" title="PartitionLabel" src="http://www.liquidstate.net/blog/wp-content/uploads/2011/10/label.png" alt="" width="195" height="150" /></a>In linux, hard drives are referred to as devices and are represented as pseudo files in /dev. For example, the first partition of the second lowest numbered SCSI drive is /dev/sdb1. If the drive referred to as /dev/sda is removed, then the remaining partition is automatically renamed /dev/sda1 at reboot, which can potentially cause your system not to boot.</p>
<p><strong>Note:</strong> if you are using LVM, then this post isn&#8217;t relevant as LVM already supports persistent naming.</p>
<p>Inversely, imagine you&#8217;ve got a system with internal SAS disks that has been working fine, with the root filesystem on <strong>/dev/sda</strong> and some other key directory (like<strong> /usr/</strong>) on <strong>/dev/sdb</strong>.  After a while, you decide to add some additional storage via a Fiber Channel card and all of a sudden the system won&#8217;t boot correctly because the RAID array on your fibre channel disks has become <strong>/dev/sda</strong>.</p>
<p>However, some people don&#8217;t seem to know that this can be easily resolved by using one of the schemes for persistent naming.  From <strong>man fstab</strong>:</p>
<pre>Instead of giving the device explicitly, one may indicate the
 (ext2 or xfs) filesystem that is to be mounted by its UUID or
 volume label (cf. e2label(8) or xfs_admin(8)), writing
 LABEL=&lt;label&gt; or UUID=&lt;uuid&gt;, e.g., LABEL=Boot or UUID=3ede-813...
 This will make the system more robust: adding or removing a SCSI
 disk changes the disk device name but not the filesystem volume label.</pre>
<h2>Persistent naming</h2>
<p>There are two main methods of addressing filesystems in a persistent fashion; <strong>by-uuid</strong> or <strong>bl-label</strong>.</p>
<ul>
<li><a href="http://en.wikipedia.org/wiki/UUID" rel="nofollow">UUID</a> is a mechanism to give each filesystem a unique identifier. All Linux filesystems (including swap) support UUID.  And although, FAT and NTFS filesystems technically don&#8217;t, they will still be presented with a unique identifier.  The downside is that they&#8217;re not very readable (eg. &#8220;<strong>63c9c012-d93d-4953-962a-66f8130238af</strong>&#8220;).</li>
<li>Almost all filesystems types can have a label, including ext2, ext3, xfs, btrfs and swap <strong></strong> filesystems.  FAT file<br />
systems don&#8217;t have any mechanism to support disk labels, so you should use the udev by-id device specification instead.  Labels are the preferred method, but can suffer from name collisions if you&#8217;re not sensible about the labels you assign.</li>
</ul>
<p>On boot, <strong>udev</strong> reads the available filesystem labels and configures useful symlinks under <strong>/dev/disk</strong>:</p>
<pre>[root@localhost ~]# ls -lR /dev/disk/by-uuid
/dev/disk/by-uuid:
lrwxrwxrwx 1 root root 10 Apr 26  2010 63c9c012-d93d-4953-962a-66f8130238af -&gt; ../../sda1</pre>
<pre>[root@localhost ~]# ls -lR /dev/disk/by-label
/dev/disk/by-label:
lrwxrwxrwx 1 root root 10 Apr 26  2010 boot -&gt; ../../sda1</pre>
<p>You can also use the <strong>blkid</strong> command to query block device attributes, including UUID and labels:</p>
<pre>[root@localhost ~]# blkid
/dev/mapper/VolGroup00-LogVol01: TYPE="swap"
/dev/mapper/VolGroup00-LogVol00: UUID="b990560a-1d49-4751-afdb-7f3bd070d140" TYPE="ext3"
/dev/sda1: LABEL="/boot" UUID="63c9c012-d93d-4953-962a-66f8130238af" TYPE="ext3"
/dev/hda: LABEL="CentOS_5.3_Final" TYPE="iso9660"
/dev/VolGroup00/LogVol00: UUID="b990560a-1d49-4751-afdb-7f3bd070d140" TYPE="ext3"
/dev/VolGroup00/LogVol01: TYPE="swap"</pre>
<h2>Setting Disk Labels</h2>
<p>How to set or change a disk label depends on the filesystem.  Below are some common examples:</p>
<ul>
<li>
<pre><strong>EXT2/EXT3:</strong> e2label /dev/XXX &lt;label&gt;</pre>
</li>
<li>
<pre><strong>ReiserFS:</strong> reiserfstune -l &lt;label&gt; /dev/XXX</pre>
</li>
<li>
<pre><strong>JFS:</strong> jfs_tune -L &lt;label&gt; /dev/XXX</pre>
</li>
<li>
<pre><strong>XFS:</strong> xfs_admin -L &lt;label&gt; /dev/XXX</pre>
</li>
<li>
<pre><strong>Btrfs:</strong> btrfs filesystem label &lt;device&gt; &lt;newlabel&gt;</pre>
</li>
<li>
<pre><strong>Swap:</strong> mkswap -L SWAP0 /dev/XXX</pre>
</li>
</ul>
<h2>Using Persistent Naming</h2>
<p>There are two ways to use the above persistent naming schemes.  Firstly, you could simple reference the device by the symlink in <strong>/dev/disk/by-uuid/XXX</strong> or <strong>/dev/disk/by-label/XXX</strong> as shown above, or, more directly as in the examples below by prefixing with either <strong>LABEL=XXX</strong> or <strong>UUID=XXX</strong>.</p>
<div>
<p><strong>Example of /etc/fstab with disk labels:</strong></p>
<pre>LABEL=ROOT          /         ext3    defaults      - 1
LABEL=BOOT          /boot     ext3    defaults      - 2
LABEL=SWAP          swap      swap    defaults      0 0
LABEL=HOME          /home     ext3    nosuid,auto   - 2</pre>
<p><strong>Example of /boot/grub/grub.conf with disk labels:</strong></p>
<pre>title CentOS  root (hd0,0)
kernel (hd0,0)/vmlinuz ro root=LABEL=ROOT rhgb quiet
initrd (hd0,0)/initrd.img</pre>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.liquidstate.net/blog/technology/using-disk-labels/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Stop filing everything!</title>
		<link>http://www.liquidstate.net/blog/other/stop-filing-everything/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=stop-filing-everything</link>
		<comments>http://www.liquidstate.net/blog/other/stop-filing-everything/#comments</comments>
		<pubDate>Mon, 10 Oct 2011 20:23:17 +0000</pubDate>
		<dc:creator>Bryan</dc:creator>
				<category><![CDATA[Other]]></category>

		<guid isPermaLink="false">http://www.liquidstate.net/blog/?p=689</guid>
		<description><![CDATA[I used to pride myself on how well organised my &#8220;stuff&#8221; was.  At home, I diligently hole punched my bank statements and other various incoming dead tree sources and put them in a collection of ring binders, all in chronological order naturally.  Likewise, at work, I sorted my emails into various folders and had a [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.liquidstate.net/blog/other/stop-filing-everything/attachment/filing/" rel="attachment wp-att-690" title="filing"><img class="alignright size-full wp-image-690" title="filing" src="http://www.liquidstate.net/blog/wp-content/uploads/2011/10/filing.jpg" alt="" width="195" height="150" /></a>I used to pride myself on how well organised my &#8220;stuff&#8221; was.  At home, I diligently hole punched my bank statements and other various incoming dead tree sources and put them in a collection of ring binders, all in chronological order naturally.  Likewise, at work, I sorted my emails into various folders and had a multitude of mail rules to automatically file emails into the right folder.</p>
<p>However, a few years ago, I stopped.  I just couldn&#8217;t handle the inefficiency of it all.  I seemed to spend a stupid amount of time organising things on the off chance that I was asked to produce a particular piece of paperwork or quote a block of text from some email I received months ago.</p>
<p>These days, I rely on search.  At home, at the start of each year, I take a big box that practically all my paperwork gets put into.  Every few years, I shred/recycle the contents of the oldest box.  Since implementing it, I&#8217;ve been asked to produce a particular document only a handful of times.  Interestingly, it doesn&#8217;t take as long as you would think to find a particular document and there&#8217;s no doubt as to where it should be &#8211; everything is in one of those boxes.  Meanwhile, at work, I have my &#8220;inbox&#8221; where all new emails arrive and an &#8220;Email&#8221; archive folder where everything is put once its gone through my <a title="GTD" href="http://www.davidco.com/about-gtd" target="_blank">GTD</a> (Getting Things Done) system.  Like at home, I create a new archive file at the start of each year.  I archive my &#8220;Sent Items&#8221; into an annual folder too so that I&#8217;ve got a record of everything.</p>
<p><a href="http://www.liquidstate.net/blog/wp-content/uploads/2011/10/FolderStructure.jpg" rel="shadowbox[sbpost-689];player=img;" title="FolderStructure"><img class="alignleft size-thumbnail wp-image-691" title="FolderStructure" src="http://www.liquidstate.net/blog/wp-content/uploads/2011/10/FolderStructure-195x150.jpg" alt="" width="195" height="150" /></a>It seems that a recent study by researchers at IBM have produced some evidence that suggests that I was maybe right to change my ways.  The researchers &#8220;carried out a <a title="Refinding Email" href="http://people.ucsc.edu/%7Eswhittak/papers/chi2011_refinding_email_camera_ready.pdf" target="_blank">field study</a> of 345 long-term users who conducted over 85,000 refinding actions&#8221; and found that &#8220;people who create complex folders indeed rely on these for retrieval, but these preparatory behaviors are inefficient and do not improve retrieval success. In contrast, both search and threading promote more effective finding&#8221;.  Finding emails by searches took on average 17 seconds, versus 58 seconds finding the emails in categorised folders.  The likelihood of finding the intended email was no greater when it had been filed in a folder.</p>
<p>According to the study, &#8220;people spend an average of 10% of their total email time filing messages&#8221; on the assumption that such preparatory actions will expedite  future retrieval.  That&#8217;s a pretty significant amount of time to spend doing something that doesn&#8217;t really help you in the long run.  More interesting for me was some of the results of the interviews the researchers held with their users in order to understand why people feel the need to create folders in the face of such evidence.  They found that &#8220;users receiving many messages were more likely to create folders, possibly because this serves to rationalize their inbox, allowing them to better see their ‘todos’&#8221;.  Indeed, the study suggests that &#8220;people defer responding to 37% of messages that need a reply&#8221; and that &#8220;deferral occurs because people have insufficient time to respond at once, or they need to gather input from colleagues&#8221;.</p>
<p>In other words, people seem to have a natural tendency to use their inbox as a todo list and filing emails into folders is more to do with task management than an efficient way of finding important information at a later date.</p>
<p><a href="http://www.liquidstate.net/blog/wp-content/uploads/2011/10/GTD-workflow.jpg" rel="shadowbox[sbpost-689];player=img;" title="GTD-workflow"><img class="alignright size-thumbnail wp-image-695" title="GTD-workflow" src="http://www.liquidstate.net/blog/wp-content/uploads/2011/10/GTD-workflow-195x150.jpg" alt="" width="195" height="150" /></a>So &#8230; if you want to save yourself some time, get a decent task management system up and running (like <a title="GTD" href="http://www.davidco.com/about-gtd" target="_blank">GTD</a>); stop using your inbox as a todo list; and spend more of your time making productive headway, rather than filing emails into folders in the slightly misguided hope that it will help you in the long run!  It&#8217;s worked successfully for me for a number of years and I haven&#8217;t looked back!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.liquidstate.net/blog/other/stop-filing-everything/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Basic Introduction to Public Key Cryptography</title>
		<link>http://www.liquidstate.net/blog/technology/basic-introduction-to-public-key-cryptography/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=basic-introduction-to-public-key-cryptography</link>
		<comments>http://www.liquidstate.net/blog/technology/basic-introduction-to-public-key-cryptography/#comments</comments>
		<pubDate>Mon, 10 Oct 2011 14:53:44 +0000</pubDate>
		<dc:creator>Bryan</dc:creator>
				<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://www.liquidstate.net/blog/?p=678</guid>
		<description><![CDATA[I can only really remember honestly enjoying one maths lesson in my life.  It was spread over a number of lectures as part of my degree course at Edinburgh University and taught us all how RSA Public Key cryptography actually works.  Now, I’ve long since forgotten the finer details and I don’t pretend to be [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-full wp-image-686" title="crypto" src="http://www.liquidstate.net/blog/wp-content/uploads/2011/10/crypto.jpg" alt="" width="195" height="150" />I can only really remember honestly enjoying one maths lesson in my life.  It was spread over a number of lectures as part of my degree course at Edinburgh University and taught us all how RSA Public Key cryptography actually works.  Now, I’ve long since forgotten the finer details and I don’t pretend to be a cryptographer, but I thought it might useful if I gave a layman’s guide to the basics of Public Key cryptography.</p>
<h2>Why don’t we just use a Password?</h2>
<p>Let’s assume that we have two people who would like to communicate privately.  To keep with tradition, lets call them Alice and Bob.  Traditionally, we’d suggest that Alice should encrypt a message using a secret password; send the encrypted message to Bob; and then Bob uses the same secret password to decrypt the message.  When Bob wants to reply to Alice, he performs the same process, encrypting his message with the same secret password.</p>
<p><a href="http://www.liquidstate.net/blog/wp-content/uploads/2011/10/Symmetric.png" rel="shadowbox[sbpost-678];player=img;" title="Symmetric Cryptography"><img class="alignright size-thumbnail wp-image-679" title="Symmetric Cryptography" src="http://www.liquidstate.net/blog/wp-content/uploads/2011/10/Symmetric-195x150.png" alt="" width="195" height="150" /></a>We call this symmetric cryptography because both the sender and receiver need the same information.  Both of them can encrypt and decrypt messages using the password.  There’s no way to distinguish between the two on the basis of what information they have or how they encrypt their messages.  This leads us to two critical problems:</p>
<ul>
<li>How does Alice tell Bob what the secret password is without letting anyone else know?  After all, if she has a secure way to share the password, well, why not just use that same communication medium to send the message and skip all this encryption stuff?</li>
<li>What if a third person, Chuck, intercepts the password unbeknown to Alice or Bob?  Well, Chuck could cause all sorts of trouble.  He could theoretically read any of the encrypted messages passed between Alice and Bob.  Or, if he really wanted to, he could send his own encrypted messages to either party, pretending to be Alice or Bob.</li>
</ul>
<p>So, maybe we need a Better Way…</p>
<h2><strong>Public Key Cryptography</strong></h2>
<p>Public Key cryptography relies on some fancy maths to get round some of the problems inherit with the traditional shared-secret approach.  Rather than a shared password, everyone has two keys; a Public Key and a Private Key.  Anything encrypted with the Public key can only be decrypted by the corresponding Private Key, and likewise, anything encrypted by a Private Key can only be decrypted by the corresponding Public Key.  And, importantly, it must be computationally infeasible to guess one key given the other.  Like I said, some very clever maths going on there and, that’s what we spent several hours learning at the lecture I opened this post with.</p>
<p>The point about it being computationally infeasible to work out what either key might be given the other is more important that you might immediately realise.  The whole concept behind Public Key cryptography is that you keep our Private Key locked away and never share it with anyone.  In fact, you probably want to use a traditional symmetric cryptography to encrypt your Private Key with a secret password that only you know so that only you can use the Private Key.  Meanwhile, you can openly communicate our Public Key to everyone; post it on your website, put it in your email signature or register it with public key libraries.</p>
<p>So, if you want to send a secret message to someone, you would encrypt it using <span style="text-decoration: underline;">their</span> Public Key, safe in the knowledge that only the corresponding Private Key is able to decrypt it.  Likewise, if you want to give the recipient some reassurance that the message came from you, then you could re-encrypt the resulting cipher text with <span style="text-decoration: underline;">your</span> Private Key.  Anyone with your Public Key can decrypt the resulting message, but only you could have created that message.</p>
<h2><strong>How does Public Key Cryptography work?</strong></h2>
<p>Let’s go back to our example, but this time lets assume that Alice and Bob have both created their own Public and Private key pairs.  Likewise, lets assume that they’ve both published their Public Keys to a key-exchange library – meaning that Chuck also has both Alice and Bob’s Public Key too.</p>
<p>If Alice wants to send a message to Bob, she first looks up Bob’s Public key from library.  She encrypts her message using Bob’s Public Key.  She can then pass the message on to Bob, safe in the knowledge that only Bob’s Private Key (which only Bob has) can decrypt the message.  Now, this means that even if Chuck does intercept the message, there’s nothing he can do, because he only has Bob’s Public Key and not Bob’s Private Key.  Poor Chuck.</p>
<p><a href="http://www.liquidstate.net/blog/wp-content/uploads/2011/10/Asymmetric.png" rel="shadowbox[sbpost-678];player=img;" title="Asymmetric Cryptography"><img class="alignleft size-thumbnail wp-image-680" title="Asymmetric Cryptography" src="http://www.liquidstate.net/blog/wp-content/uploads/2011/10/Asymmetric-195x150.png" alt="" width="195" height="150" /></a>When Bob receives Alice’s message, he uses his (very well protected) Private Key to decrypt the message that Alice originally encrypted using his Public Key.  To Reply, Bob repeats the same process that Alice followed, using Alice’s Public Key (that everyone has) to encrypt a message so that only Alice’s Private Key can decrypt it.</p>
<p>So, we’ve demonstrated that Alice and Bob can now communicate privately without the need to share any secret passwords.  In fact, Public Key cryptography actually relies on Alice and Bob having some method of openly sharing their Public Keys.</p>
<h2><strong>Dealing with Impostors</strong></h2>
<p>Well, if you’ve been paying attention then you’re probably thinking “that’s great, but Chuck could still impersonate either Alice or Bob”.  You’re quite right!  But, by using the same principles of Public and Private keys, we can also digitally “sign” a message to prove that it came from a particular person.</p>
<p>So, Alice and Bob have both created their own Public and Private key pairs; they’ve shared the Public Keys to everyone, including Chuck who would like to get up to mischief.  Alice wants to send a message (M) to Bob and she wants to prove to Bob that it came from her and not Chuck.</p>
<p>Alice begins by encrypting her message firstly using her Private Key.  She then encrypts it a second time using Bob’s Public Key.  The message has been encrypted twice: the first encryption guarantees that the message is from Alice (because only she has access to her Private Key); and the second encryption guarantees that no one but Bob can read it (because only Bob’s Private Key can decrypt it).</p>
<p>When Bob receives the message, he firstly decrypts the message using his Private Key.  He then decrypts the message using Alice’s Public Key.  If this works, then it means the message must have been encrypted using Alice’s Private Key, which only Alice has access to.</p>
<p>So, if Chuck was to intercept the message, he wouldn’t be able to decrypt it because other than Bob, nobody has access to Bob’s Private Key.  Likewise, he can’t pretend to be Alice and send a message to Bob because only Alice can encrypt messages using Alice’s Private Key.</p>
<p>Did you follow that okay?  Don’t worry if you’re scratching your head – just go back over it again, it sometimes just takes a while to get your head around asymmetric cryptography if you’ve been used to shared secret passwords for a long time.</p>
<h2><strong>Man in the Middle</strong></h2>
<p>Of course, nothing is perfect; as I stated earlier, Public Key authentication relies on Alice and Bob being able to share public keys.  However, all parties need to be confident that they have the right public keys.</p>
<p>As before, let’s assume that Alice wants to send a private message to Bob and they haven’t already exchanged Public Keys.  However, let’s also assume that Chuck is able to intercept communications between the two and possibly deliver false messages.</p>
<p>Alice firstly asks Bob for his public key.  If Bob sends his public key to Alice, but Chuck is able to intercept it, a man-in-the-middle attack can begin.  Chuck sends a forged message to Alice that claims to be from Bob, but instead includes Chuck&#8217;s public key.</p>
<p>Alice, believing this public key to be Bob&#8217;s, encrypts her message with Chuck&#8217;s key and sends the encrypted message back to Bob. Chuck again intercepts, decrypts the message using his (Chuck) Private Key, possibly alters the messages, and re-encrypts it using the public key that Bob originally sent to Alice.  When Bob receives the newly encrypted message, he believes it came from Alice.</p>
<p>Thankfully, there are various solutions to the problem of verifying the ownership of a Public Key.  It’s a topic in its own right, but Public Key Infrastructure (PKI) and Web Of Trust (WoT) are solutions that leverage both technology and human supervision to bind public keys with user identities with a degree of confidence.  Lets discuss that another day!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.liquidstate.net/blog/technology/basic-introduction-to-public-key-cryptography/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

