<?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>Daniel Hall&#039;s Website</title>
	<atom:link href="http://www.danielhall.me/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.danielhall.me</link>
	<description>Because the Internet doesn&#039;t have enough opinions already</description>
	<lastBuildDate>Thu, 22 Mar 2012 06:43:35 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<atom:link rel="hub" href="http://pubsubhubbub.appspot.com"/><atom:link rel="hub" href="http://superfeedr.com/hubbub"/>		<item>
		<title>Arduino Traffic Lights</title>
		<link>http://www.danielhall.me/2012/03/arduino-traffic-lights/</link>
		<comments>http://www.danielhall.me/2012/03/arduino-traffic-lights/#comments</comments>
		<pubDate>Tue, 20 Mar 2012 03:00:02 +0000</pubDate>
		<dc:creator>Daniel</dc:creator>
				<category><![CDATA[Arduino]]></category>
		<category><![CDATA[Build Light]]></category>
		<category><![CDATA[Hacking]]></category>
		<category><![CDATA[Soldering]]></category>

		<guid isPermaLink="false">http://www.danielhall.me/?p=698</guid>
		<description><![CDATA[Please Note: The instructions here are provided &#8216;as is&#8217; with no guarantee or warranty whatsoever. In no circumstances should they be used to build a traffic safety device. The traffic light device I built is a novelty and is used &#8230;<p class="read-more"><a href="http://www.danielhall.me/2012/03/arduino-traffic-lights/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<table>
<tbody>
<tr>
<td style="background-color: #f06060;"><strong>Please Note:</strong> The instructions here are provided &#8216;as is&#8217; with no guarantee or warranty whatsoever. In no circumstances should they be used to build a traffic safety device. The traffic light device I built is a novelty and is used as such.</td>
</tr>
</tbody>
</table>
<h1>Materials</h1>
<p>1 <a title="Ebay Search for 'traffic light hub'" href="http://www.ebay.com.au/sch/i.html?_nkw=traffic+light+hub" target="_blank">USB traffic light hub</a><a href="http://www.danielhall.me/wp-content/uploads/2012/03/IMG_20120317_173302.jpg"><img class="size-thumbnail wp-image-713  alignright" title="TrafficLightMaterials" src="http://www.danielhall.me/wp-content/uploads/2012/03/IMG_20120317_173302-150x150.jpg" alt="Materials for a USB Traffic Light" width="150" height="150" /></a> (search ebay for &#8216;traffic light hub&#8217;)<br />
1 <a title="SparkFun ATMega8U2 Breakout Board" href="http://www.sparkfun.com/products/10277" target="_blank">Atmega8u2 breakout board</a><br />
1 <a title="Jaycar Search for 10MM LEDs" href="http://jaycar.com.au/productResults.asp?keywords=led+10MM&amp;keyform=KEYWORD&amp;SUBMIT.x=0&amp;SUBMIT.y=0" target="_blank">each of 9mm Red Green and Orange LEDs</a><br />
3 <a title="Ebay Search for '470 Ohm Resistor'" href="http://www.ebay.com.au/sch/i.html?_nkw=470+ohm+resistor" target="_blank">470 Ohm resistors</a><br />
4 thin patch wires (preferably different colours)<br />
1 <a title="SparkFun USB Mini Cable (6ft)" href="http://www.sparkfun.com/products/598" target="_blank">USB mini cable</a><br />
1 <a title="SparkFun Sugru" href="http://www.sparkfun.com/products/10787" target="_blank">Pack of Black Sugru</a><br />
Solder<br />
Hot Glue<br />
Corrugated Cardboard</p>
<h1><a href="http://www.danielhall.me/wp-content/uploads/2012/03/IMG_20120317_172926.jpg"><img class="alignright size-thumbnail wp-image-715" title="TrafficLightEquip" src="http://www.danielhall.me/wp-content/uploads/2012/03/IMG_20120317_172926-150x150.jpg" alt="Equiptment for the USB Traffic Light" width="150" height="150" /></a>Equipment</h1>
<p>A Dremel, or similar cutting tool<br />
Hot Glue Gun<br />
Soldering Iron<br />
Wire Strippers<br />
Wire Cutters<br />
Spudger tool, or guitar pick, stanley knife or fingernails<br />
Linux PC (with avr-gcc and dfu-programmer commands installed)</p>
<h1>Details</h1>
<p><strong>1. Use the spudger to open the traffic light<a href="http://www.danielhall.me/wp-content/uploads/2012/03/IMG_20120317_175940.jpg"><img class="alignright size-thumbnail wp-image-723" title="TrafficLightPulledApart" src="http://www.danielhall.me/wp-content/uploads/2012/03/IMG_20120317_175940-150x150.jpg" alt="The Traffic Light once pulled apart" width="150" height="150" /></a></strong></p>
<p>The weakest part of the traffic light is the stem but it is nearly impossible to open it from there. The approach that I took was to pry the top open a little, then pry the bottom open a little, then carefully pull the two halves apart at the same time. This ensures that you dont snap the plastic holding the stem together. If you don&#8217;t have four wires from the materials list, you can strip the USB cable and use those since it contains four differently coloured wires.</p>
<p><strong>2. Gut the traffic light<a href="http://www.danielhall.me/wp-content/uploads/2012/03/IMG_20120317_182921.jpg"><img class="alignright size-thumbnail wp-image-727" title="TrafficLightGutted" src="http://www.danielhall.me/wp-content/uploads/2012/03/IMG_20120317_182921-150x150.jpg" alt="The traffic light after reordering the windows and removing hub board" width="150" height="150" /></a></strong></p>
<p>Remove the USB hub circuit board. You can use this board later in another project or two, should you do you will probably want to cut off the LEDs. In my board the little plastic windows were in the wrong order for Australian traffic lights. Luckily this is easy to fix, simply pop them out and press them back in the correct place. Feel free to put the windows in any order that you wish, just remember to alter the program later before compiling and flashing it.</p>
<p><strong>3. Make room<a href="http://www.danielhall.me/wp-content/uploads/2012/03/IMG_20120317_190343.jpg"><img class="alignright size-thumbnail wp-image-730" title="TrafficLightCut" src="http://www.danielhall.me/wp-content/uploads/2012/03/IMG_20120317_190343-150x150.jpg" alt="The Traffic Light after cutting out the inside" width="150" height="150" /></a></strong></p>
<p>Its a little hard to fit the Circuitry into the case with the two supports that held the hub in place, additionally you need a little extra space for the thickness of the cardboard. You can get all this by using a Dremel to remove the supports and some of the plastic around the USB sockets. Be careful to not hit the side of the case as I did on my first one as the plastic is thin and easily blemishes the outside. The photo shows one before modification on the left and after a fight with the Dremel on the left.</p>
<p><strong>4. Make the cardboard circuit board<a href="http://www.danielhall.me/wp-content/uploads/2012/03/IMG_20120317_210803.jpg"><img class="alignright size-thumbnail wp-image-738" title="TrafficLightCardboardFront" src="http://www.danielhall.me/wp-content/uploads/2012/03/IMG_20120317_210803-150x150.jpg" alt="The front of the cardboard board" width="150" height="150" /></a></strong></p>
<p>The process of getting a circuit board built takes too long for a quick hack like this and I didn&#8217;t have any protoboard lying around. This all means that we get to make a crazy cardboard circuit board. The best thing about cardboard is that you can draw on it as you build it, and you can easily cut it to fit the interior of the device easily. Basically put the LEDs and resistors through the cardboard next to each other. For ease of wiring put align all the LEDs to have their long legs in the same direction. Wire each short leg to a resistor and the free legs of all the resistors to a single black wire. Finally wire <a href="http://www.danielhall.me/wp-content/uploads/2012/03/IMG_20120317_210753.jpg"><img class="alignright size-thumbnail wp-image-739" title="TrafficLightCardboardBack" src="http://www.danielhall.me/wp-content/uploads/2012/03/IMG_20120317_210753-150x150.jpg" alt="The back of the cardboard board" width="150" height="150" /></a>each of the long legs of the LEDs to a different coloured wire. Once this is done you should test each lead and LED to make sure it is correctly wired. You can do this by connecting ground to the black lead, and 3-5V to the coloured leads.</p>
<p><strong>5. Connect to the Breakout board</strong></p>
<p>Now we take out the SparkFun Atmega8U2 breakout and solder it to the LEDs on our cardboard board. This is pretty simple, basically you solder the wire from the resistors to the hole labelled GND, the green LED to PB7, the orange LED to PB6 and finally the red <a href="http://www.danielhall.me/wp-content/uploads/2012/03/IMG_20120317_221900.jpg"><img class="alignright size-thumbnail wp-image-749" title="TrafficLightBreakoutWiring" src="http://www.danielhall.me/wp-content/uploads/2012/03/IMG_20120317_221900-150x150.jpg" alt="The breakout board showing the wires coming from the cardboard board" width="150" height="150" /></a>LED to PB5. You will likely want to cut the wires so that they reach the board where it will sit, and only have a few extra millimeters. If you leave too much room then you will have issues trying to put the wires inside the case, and of course if you don&#8217;t leave enough you wont be able to get the breakout board to sit in the right place.</p>
<p><strong>6. Load the software on the device and test</strong></p>
<p>You can find the<a title="The USB Traffic Light firmware sources." href="https://github.com/smarthall/USBTrafficLight" target="_blank"> code to build the firmware</a> on <a title="My GitHub Account" href="https://github.com/smarthall" target="_blank">my GitHub account</a>. Provided that you have avr-gcc and dfu-programmer installed you should be able to simply clone that repository and type &#8216;make all&#8217; inside it. If that refuses to work for some reason though, I have attached the output of compilation, a hex file (which is uploaded as a txt file to stop wordpress whining). You can download the hex file here: <a href="http://www.danielhall.me/wp-content/uploads/2012/03/sparkfun_USBtoSerial.hex_.txt">USBTrafficLight.hex</a>. This hex file, or the one that&#8217;s output from programming can be programmed onto the device easily. First you put the device into bootloader mode by plugging it into the computer then hit the reset button. Finally you run the following commands:</p>
<pre class="brush: bash; title: ; notranslate">dfu-programmer at90usb82 erase # Erase MCU
dfu-programmer at90usb82 flash USBTrafficLight.hex # Flash MCU
dfu-programmer at90usb82 reset # Reset MCU</pre>
<p>You will have to unplug and plug the device back in to get it out of bootloader mode. Once you have programmed the device you should run a test to make sure it works. You can do this by writing characters to the virtual serial port the device creates. The following commands will do this for you:</p>
<pre class="brush: bash; title: ; notranslate">echo 'g' &gt; /dev/ttyACM0 # Should be green
echo 'o' &gt; /dev/ttyACM0 # Should be orange
echo 'r' &gt; /dev/ttyACM0 # Should be red</pre>
<p><strong>7. Cut a hole in the base<a href="http://www.danielhall.me/wp-content/uploads/2012/03/IMG_20120318_095229.jpg"><img class="alignright size-thumbnail wp-image-763" title="TrafficLightHoleCut" src="http://www.danielhall.me/wp-content/uploads/2012/03/IMG_20120318_095229-150x150.jpg" alt="Showing the hole cut in the base of the back piece of the Traffic Light" width="150" height="150" /></a></strong></p>
<p>This is the part I&#8217;m least happy with. Here you have to cut a hole in the base so that you can plug in a mini usb cable. I generally cut a rectangular hole in the back piece of the traffic light that is about the same size as the USB cable I&#8217;m using. This rectangle usually goes about halfway up the base, and goes right to the bottom while being a little bit wider then a USB mini cable. I also cut a small drill hole to allow access to the reset button for loading new firmware. Make sure you test that you can plug in the USB mini cable. Instead of cutting a hole in the base I&#8217;ve been thinking about building a USB cable into the device. This is difficult because the USB mini port on the breakout is SMD and the pins are not broken out. If you have any ideas on the best way to do this, please let me know in the comments.</p>
<p><strong>8. Install the cardboard board and the breakout board<a href="http://www.danielhall.me/wp-content/uploads/2012/03/IMG_20120318_102733.jpg"><img class="alignright size-thumbnail wp-image-764" title="TrafficLightCardBoardGlue" src="http://www.danielhall.me/wp-content/uploads/2012/03/IMG_20120318_102733-150x150.jpg" alt="Showing how I glued in the cardboard board" width="150" height="150" /></a></strong></p>
<p>The cardboard section should be easy to slide into the back case of the device. Should there be an issue making things fit you can always trim the cardboard, or pad it with paper. You should glue the cardboard into the back through the USB port hole where the hub was. This accomplishes two things, it attaches the cardboard to the back, and it partially fills the holes that we will later fill with Surgu, saving you a little Sugru. If you bought clear LEDs instead of diffused ones you may wish to glue something to diffuse the light to the front (I use baking paper, sometimes two layers). Install the breakout board by putting a little hot glue on the bottom, pushing it into place, plugging in the mini USB cable then finally wiggling it into the perfect position. You&#8217;ll also want to tie up your wires using a little electrical tape to make them easier to manage in the last step.</p>
<p><strong>9. Install the front and patch holes<a href="http://www.danielhall.me/wp-content/uploads/2012/03/IMG_20120318_103612.jpg"><img class="alignright size-thumbnail wp-image-765" title="TrafficLightSugruUSB" src="http://www.danielhall.me/wp-content/uploads/2012/03/IMG_20120318_103612-150x150.jpg" alt="The Traffic Light USB port surrounded by Sugru to give it a nice clean look" width="150" height="150" /></a></strong></p>
<p>Mould some Sugru into the holes left behind from where the USB hub was, and into the extra space around the USB mini plug. Make sure that you continuously test the USB mini plug to ensure you don&#8217;t add too much Sugru, also do not get any Sugru into the plug. You can use soapy water and rubbing to make the Sugru surface smooth if you wish. Then install the front of the case and leave the Sugru to set, which takes about 6-12 hours. Once the Surgu has set the device is ready to use.</p>
<h1>Instructions for use</h1>
<p>The interface to the device is implemented as a USB to Serial adapter, however since there is not serial interface, and the entire device is self contained we don&#8217;t have to implement the entire spec. A USB to Serial device is implemented by sending characters and control messages over the USB bus. However because there is no serial interface we can ignore all the control messages. The firmware above simply grabs the characters from the stream and acts on them. This means that the device will work regardless of the baud rate, stop bits or parity settings. On Linux and OSX this means that all you have to do to control the device is to echo characters to the character device. You can send &#8216;g&#8217; for green, &#8216;o&#8217; for orange, &#8216;r&#8217; for red and any digit from 0-7 for all the possible light configurations. A simple test script for a Linux PC looks like this:</p>
<pre class="brush: bash; title: ; notranslate">#!/bin/bash

while /bin/true; do
  echo 'g' &gt; /dev/ttyACM0
  sleep 2
  echo 'o' &gt; /dev/ttyACM0
  sleep 2
  echo 'r' &gt; /dev/ttyACM0
  sleep 2
  echo 'a' &gt; /dev/ttyACM0
  sleep 2
done</pre>
<p><a href="http://www.danielhall.me/wp-content/uploads/2012/03/IMG_20120318_105718.jpg"><img class="alignleft size-large wp-image-768" title="TrafficLightFinished" src="http://www.danielhall.me/wp-content/uploads/2012/03/IMG_20120318_105718-768x1024.jpg" alt="The completed Traffic Light" width="620" height="826" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.danielhall.me/2012/03/arduino-traffic-lights/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Error messages aren&#8217;t perfect</title>
		<link>http://www.danielhall.me/2011/04/error-messages-arent-perfect/</link>
		<comments>http://www.danielhall.me/2011/04/error-messages-arent-perfect/#comments</comments>
		<pubDate>Wed, 20 Apr 2011 11:03:49 +0000</pubDate>
		<dc:creator>Daniel</dc:creator>
				<category><![CDATA[System Administration]]></category>
		<category><![CDATA[Debugging]]></category>
		<category><![CDATA[Error]]></category>
		<category><![CDATA[NetWare]]></category>
		<category><![CDATA[NFS]]></category>
		<category><![CDATA[Novell]]></category>
		<category><![CDATA[Strace]]></category>
		<category><![CDATA[X]]></category>
		<category><![CDATA[Xauth]]></category>

		<guid isPermaLink="false">http://www.danielhall.me/?p=516</guid>
		<description><![CDATA[When diagnosing a problem with a complex system such as Linux you sometimes need to step back, stop what you&#8217;re doing and take a different approach. Usually when a program fails on Linux you will get some kind of error &#8230;<p class="read-more"><a href="http://www.danielhall.me/2011/04/error-messages-arent-perfect/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<p>When diagnosing a problem with a complex system such as Linux you sometimes need to step back, stop what you&#8217;re doing and take a different approach. Usually when a program fails on Linux you will get some kind of error message, traceback or coredump. Most people prefer to see some kind of error message rather than the latter two..</p>
<p>Tracebacks and coredumps are computer generated, which makes them more accurate then error messages, but harder for humans to understand. Error messages however are put in place by the programmer which means they can occasionally be misleading, inaccurate, ambiguous or just plain wrong. This is not always the programmers fault, sometimes its hard to describe exactly what went wrong. Other times the error describes the situation perfectly, but the sysadmin jumps to a different conclusion based on his circumstances.</p>
<h2>Example</h2>
<p>Some time ago we had some users complaining about a problem when trying to use X Forwarding via SSH. On this server /home was mounted off a Novell NetWare NFS share. They were getting the following output and were unable to run X11 applications.</p>
<pre class="brush: plain; title: ; notranslate">xauth: error in locking authority file /home/daniel/.Xauthority</pre>
<p>Seeing this error I assumed that something was going wrong with the locking mechanism of NFS. I tried mounting the NFS share with the explicit lock option, but the same error remained. I tried explicitly giving the sync option too, but to no avail. I ended up trying many different NFS options until eventually I gave up and asked the Novell administrators to check their servers. I was convinced that something on their end was causing this locking error.</p>
<p>The Novell administrator responded that they could see nothing wrong on their end. This must mean that something was wrong on our side. I tried restarting the nfsstad and lockd initscripts and the whole machine but once again the same issue persisted. I checked the server using the rpcinfo command, which showed that everything was working fine. I even connected to the daemon using telnet (though I couldn&#8217;t talks its language) and confirmed a firewall was not in the way.</p>
<p>I thought that maybe there was something going wrong in the interaction between the client and the server, so I ran a tcpdump to capture all the packets transferred between them. this is where I made a small breakthrough. I found a NFS reply that had returned with SERVFAIL and error code 526. Googling for this error and Netware generally pointed towards a problem with character sets not getting preserved to the Novell server. There was nothing but ordinary characters on the filesystem, so much for that idea.</p>
<p>I wanted to know exactly what was happening when xauth was trying to lock the file, so I did an strace on it. Here are the last few lines (after xauth mmaped its libraries).:</p>
<pre class="brush: plain; title: ; notranslate">stat(&quot;/home/e71377/.Xauthority-c&quot;, {st_mode=S_IFREG|0600, st_size=0, ...}) = 0
unlink(&quot;/home/e71377/.Xauthority-c&quot;)    = 0
unlink(&quot;/home/e71377/.Xauthority-l&quot;)    = -1 ENOENT (No such file or directory)
open(&quot;/home/e71377/.Xauthority-c&quot;, O_WRONLY|O_CREAT|O_EXCL, 0600) = 3
close(3)                                = 0
link(&quot;/home/e71377/.Xauthority-c&quot;, &quot;/home/e71377/.Xauthority-l&quot;) = -1 ESERVERFAULT (Unknown error 526)
write(2, &quot;xauth:  error in locking authori&quot;..., 65xauth:  error in locking authority file /home/e71377/.Xauthority
) = 65
exit_group(1)                           = ?</pre>
<p>So it appears that this was not a file locking problem at all. xauth was successfully creating the files but it failed when it tried to create a hardlink. Reviewing the code for libXau (AuLock.c) revealed exactly why:</p>
<pre class="brush: cpp; title: ; notranslate">    while (retries &gt; 0) {
        if (creat_fd == -1) {
            creat_fd = open (creat_name, O_WRONLY | O_CREAT | O_EXCL, 0600);
            if (creat_fd == -1) {
                if (errno != EACCES)
                    return LOCK_ERROR;
            } else
                (void) close (creat_fd);
        }
        if (creat_fd != -1) {
#ifndef X_NOT_POSIX
            /* The file system may not support hard links, and pathconf should tell us that. */
            if (1 == pathconf(creat_name, _PC_LINK_MAX)) {
                if (-1 == rename(creat_name, link_name)) {
                    /* Is this good enough?  Perhaps we should retry.  TEST */
                    return LOCK_ERROR;
                } else {
                    return LOCK_SUCCESS;
                }
            } else {
#endif
                if (link (creat_name, link_name) != -1)
                    return LOCK_SUCCESS;
                if (errno == ENOENT) {
                    creat_fd= -1;       /* force re-creat next time around */
                    continue;
                }
                if (errno != EEXIST)
                    return LOCK_ERROR;
#ifndef X_NOT_POSIX
           }
#endif
        }
        (void) sleep ((unsigned) timeout);
        --retries;
    }</pre>
<p>xauth isn&#8217;t trying to lock the file through flock() or another file locking method, which means that it is not the cause. Instead xauth is creating a file, and then to make sure it is the only program altering .Xauthority it creates a link. If the link succeeds then its the only program, if not then another program has the lock. The problem happens when xauth tries to make the hardlink. Interestingly there is a fallback for non-POSIX systems, but as RHEL is POSIX compatible it is not used.</p>
<p>It appeared that the NFS server did not support hard links. To test this theory I created several files, and attempted to create hard links using &#8216;cp -l file1 file2&#8242;. and they failed in the exact same way. All I had to do now was explain to the Novell Administrator that the problem was not locking, and was in fact that we were mounting a filesystem which did not support hard links on a POSIX compatible system. The Novell share was changed to support hard links (don&#8217;t ask me how, I&#8217;m not a Novell guy) and everything was working again.</p>
<h2>Conclusion</h2>
<p>The lesson to take away from here is not that hardlinks are required on POSIX, or that xauth doesn&#8217;t use file locking but locks itself via a dance of hardlinks. The lesson here is that you should never trust error messages. Take them as a hint, use them as a starting point but do not take them as law. You need to remember that the error message was written by a human and you may not be interpreting it how it was written.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.danielhall.me/2011/04/error-messages-arent-perfect/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>mod_pagespeed is not (always) the answer</title>
		<link>http://www.danielhall.me/2011/04/mod_pagespeed-is-not-always-the-answer/</link>
		<comments>http://www.danielhall.me/2011/04/mod_pagespeed-is-not-always-the-answer/#comments</comments>
		<pubDate>Wed, 13 Apr 2011 10:59:44 +0000</pubDate>
		<dc:creator>Daniel</dc:creator>
				<category><![CDATA[System Administration]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[mod_pagespeed]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Profiling]]></category>
		<category><![CDATA[Web Page Performance]]></category>

		<guid isPermaLink="false">http://www.danielhall.me/?p=676</guid>
		<description><![CDATA[What is mod_pagespeed Google recently released a chunk of code in the form of an Apache module. The idea is that you install it in your Apache server, it sits in between your application and the web browser and modifies &#8230;<p class="read-more"><a href="http://www.danielhall.me/2011/04/mod_pagespeed-is-not-always-the-answer/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<h2>What is mod_pagespeed</h2>
<p>Google recently released a chunk of code in the form of an Apache module. The idea is that you install it in your Apache server, it sits in between your application and the web browser and modifies the served requests to make the page load faster.<br />
It does this by using combinations of filters, some are well known best practices, others are newer ideas. For example on filter simply minifies your JavaScript while another embeds small images in a page using data-uris. The changes these filters make range from low risk, to high risk. It should be noted that not all the filters will improve the page time some even making pages slower in some cases.</p>
<h2>So what&#8217;s the issue?</h2>
<p>The issue here really isn&#8217;t mod_pagespeed, but it&#8217;s the way people are viewing it. In my job as a Web Performance Engineer I have had several people recently say to me &#8220;let&#8217;s put mod_pagespeed on our web server to make it faster&#8221;. This is a break from normal attitudes, if someone were to to say &#8220;we should put our images into data-uris&#8221; then people would question the speed benefit, or the extra load on the server. For some reason when Google implement a page speed module people just assume that it will make their page faster, and that it will work in their environment. The truth is that Google really have no idea what the module will do to your page.</p>
<p>The second issue is that all these tweaks can usually be better implemented at the application level. If you minimize all your JavaScript as part of your build process then the web server will not have to do it for you. The same applies to data-uris. If they are simply part of the page then the browser doesn&#8217;t need to read in the extra image, uuencode it, then compress it. All that is quite a lot of work, which only really needs to be done once.</p>
<h2>So what should I use mod_pagespeed for then?</h2>
<p>You don&#8217;t always have access to the application code. If you are using third party software then before mod_pagespeed you may have had no control over the minification of CSS. This is where the module really shines. It gives you a layer between the application code and the web browser where you can apply all sorts of performance tuning.</p>
<p>The other advantage I can see is for looking for the best tunings to apply to your application quickly. You can setup mod_pagespeed and and run experimental tests with the filters on of and with a control to quickly figure out what rules you should apply in your application.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.danielhall.me/2011/04/mod_pagespeed-is-not-always-the-answer/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Rebooting with &#8216;The Big Hammer&#8217;</title>
		<link>http://www.danielhall.me/2010/12/rebooting-with-the-big-hammer/</link>
		<comments>http://www.danielhall.me/2010/12/rebooting-with-the-big-hammer/#comments</comments>
		<pubDate>Sun, 12 Dec 2010 00:57:40 +0000</pubDate>
		<dc:creator>Daniel</dc:creator>
				<category><![CDATA[System Administration]]></category>
		<category><![CDATA[Desperation]]></category>
		<category><![CDATA[Emergency]]></category>
		<category><![CDATA[HOWTO]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Overkill]]></category>
		<category><![CDATA[Recovery]]></category>

		<guid isPermaLink="false">http://www.danielhall.me/?p=670</guid>
		<description><![CDATA[Today I had a machine I was working on spit the dummy in a really bad way. It had a tonne of IO errors to its root filesystem and eventually decided to remount it read only. Of course this meant &#8230;<p class="read-more"><a href="http://www.danielhall.me/2010/12/rebooting-with-the-big-hammer/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<p>Today I had a machine I was working on spit the dummy in a really bad way. It had a tonne of IO errors to its root filesystem and eventually decided to remount it read only. Of course this meant that it was almost entirely wedged. I tried the reboot command, the init command and everything would lockup my terminal. Not having console or physical access to the machine I couldn&#8217;t simply hit the power button, so I used the Linux magic commands:</p>
<p><code><br />
# echo 1 &gt; /proc/sys/kernel/sysrq<br />
# echo b &gt; /proc/sysrq-trigger<br />
</code></p>
<p>Of course the disk errors meant that it was unable to boot but &#8216;The Big Hammer&#8217; struck me as something extremely useful.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.danielhall.me/2010/12/rebooting-with-the-big-hammer/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Programming In Javascript</title>
		<link>http://www.danielhall.me/2010/07/programming-in-javascript/</link>
		<comments>http://www.danielhall.me/2010/07/programming-in-javascript/#comments</comments>
		<pubDate>Thu, 29 Jul 2010 11:48:36 +0000</pubDate>
		<dc:creator>Daniel</dc:creator>
				<category><![CDATA[Web Programming]]></category>
		<category><![CDATA[Chrome]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[Internet Explorer]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[JScript]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Safari]]></category>
		<category><![CDATA[WebKit]]></category>

		<guid isPermaLink="false">http://www.danielhall.me/?p=657</guid>
		<description><![CDATA[Javascript is an interesting language. Its partly a functional programming language and part object oriented. It uses a C style syntax but borrows its naming conventions from Java (mostly). Personally I find Javascript language to be one of the most &#8230;<p class="read-more"><a href="http://www.danielhall.me/2010/07/programming-in-javascript/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<p>Javascript is an interesting language. Its partly a functional programming language and part object oriented. It uses a C style syntax but borrows its naming conventions from Java (mostly). Personally I find Javascript language to be one of the most interesting languages that I have played with. The complaints I hear most often regarding Javascript are that it is very hard to learn and that there are many subtle differences between the interpreters.</p>
<h2>Difficult to learn</h2>
<p>This used to be mostly true. Javascript was a poorly documented language, often only documented in tutorial form by w3schools, or technically documented as ECMAScript. The absolute wealth of tutorials and blog posts made the good information few and far between. Largely when looking for information on how to perform a particular function you had to download some sample code and figure out how it was done based on that.</p>
<p>More recently though Javascript has caught the wave that is trying to standardize the web and this has somewhat improved the situation. Browser manufacturers are documenting their Javascript implementations and largely converging on a common standard. Additionally many helper libraries have been introduced to make the task of working on Javascript even easier. Once Javascript may have been difficult to learn, but as of late this is no longer true.</p>
<p>Javascript Documentation:</p>
<ul>
<li><a href="https://developer.mozilla.org/en/javascript">Mozilla Developer Center &#8211; Javascript</a></li>
<li><a href="http://developer.apple.com/safari/library/documentation/AppleApplications/Reference/WebKitDOMRef/index.html">WebKit DOM Reference</a></li>
<li><a href="http://msdn.microsoft.com/en-us/library/yek4tbz0%28VS.85%29.aspx">MSDN &#8211; JScript Language Reference</a></li>
<li><a href="http://dev.opera.com/libraries/">Opera Libraries</a></li>
</ul>
<h2>Subtle differences in interpretation</h2>
<p>This is is one of the biggest problems you still see in Javascript today. You will often find developers writing functions to simply deal with the differences between browsers, there are even entire libraries dedicate to to abstracting away the differences. If I had a dollar for every implementation of a function to get a XMLHttpRequest object across browsers, I wouldn&#8217;t need my job.</p>
<p>﻿﻿﻿﻿﻿Unfortunately it is still however very important to know the differences between implementations of Javascript if you plan on writing anything that will run on more than one browser. These difference may be in the features available in the language, in the Document Object Model or in the way the browser handles CSS. Thankfully many people work on documenting the difference and abstracting around them in libraries.</p>
<p>Javascript Implementations Differences:</p>
<ul>
<li><a href="http://quirksmode.org/">Quirks Mode</a></li>
<li><a href="https://developer.mozilla.org/en/Migrate_apps_from_Internet_Explorer_to_Mozilla">Browser Migration &#8211; MDN</a></li>
<li><a href="http://www.webdevout.net/browser-support-css">Web Browser CSS Support</a></li>
</ul>
<p>Javascript Libraries:</p>
<ul>
<li><a href="http://dojotoolkit.org/">DOJO ToolKit</a></li>
<li><a href="http://www.prototypejs.org/">Prototype</a></li>
<li><a href="http://jquery.com/">jQuery</a></li>
<li><a href="http://script.aculo.us/">script.aculo.us</a></li>
<li><a href="http://miniajax.com/">MiniAJAX</a></li>
</ul>
<p><b>Random Thought:</b> If only Facebook didn&#8217;t get in the way of Javascript all the time&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.danielhall.me/2010/07/programming-in-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Protecting Email with DKIM</title>
		<link>http://www.danielhall.me/2010/07/protecting-email-with-dkim/</link>
		<comments>http://www.danielhall.me/2010/07/protecting-email-with-dkim/#comments</comments>
		<pubDate>Mon, 12 Jul 2010 12:57:19 +0000</pubDate>
		<dc:creator>Daniel</dc:creator>
				<category><![CDATA[System Administration]]></category>
		<category><![CDATA[DKIM]]></category>
		<category><![CDATA[Email]]></category>
		<category><![CDATA[Mail]]></category>
		<category><![CDATA[Phishing]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Spam]]></category>

		<guid isPermaLink="false">http://www.danielhall.me/?p=629</guid>
		<description><![CDATA[One of the problems with the email and the protocols used to transfer it (SMTP) is that they were designed long ago when the Internet was a much friendlier place. When SMTP was designed it was assumed that other hosts &#8230;<p class="read-more"><a href="http://www.danielhall.me/2010/07/protecting-email-with-dkim/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<p>One of the problems with the email and the protocols used to transfer it (SMTP) is that they were designed long ago when the Internet was a much friendlier place. When SMTP was designed it was assumed that other hosts on the Internet could be trusted. This is particularly visible in the configuration of relays where the sender doesn&#8217;t have to be identified. A mail relay will accept mail from any server regardless of where the mail appears to be coming from.</p>
<p>To attempt to rectify this SPF was created. To setup SPF you add either a TXT or an SPF record to the DNS zone you will be sending from. This record defines which servers are allowed to send mail that is coming from that domain. So on my domain danielhall.me I could publish an SPF record that says only my mail server is allowed to send mail that ends in @danielhall.me. Any mailservers receiving mail that is from my domain but not coming from an address listed in my SPF record can see that the mail is likely forged and throw it away. SPF works well in most situations but fails at a very common use case. If someone I send mail to tries to forward it to another address using an automatic process (no clicking forward in their client) then the mail will appear to come from my domain when it gets to the user it was forwarded to, however it will have came from the original recipients mailserver.</p>
<p>DKIM solves this problem by giving each sending mailserver a cryptographic key pair. The public keys is then published in a DNS record in that zone and stores the private key somewhere safe on the server. The server then proceeds to sign the headers (especially the From: header) and the body of all outgoing emails. This signature is then attached to the email as an extra header. When the receiving server get the email it gets the signature and uses that along with the list of signed headers to verify the signature against the public key of the signing domain. This means as long as the mail has passed through an authorised mailserver at any point it will be considered valid.</p>
<p>Setting up a DKIM is relatively simple process. You will need access to the  zone records for your domain and access to the configuration of all the mailservers which all mail originating at your domain passes through. You also need to be aware that signing mail makes it slightly more processor intensive to send an email. If you send a large amount of email this difference could be quite significant. If you&#8217;re using sendmail you may be able to alleviate it by switching to a less resource hungry MTA like Exim. You should also note that in some configurations DKIM can not be setup. For example if you use masquerading in sendmail DKIM will always fail as sendmail will modify the from header after signing.</p>
<p>Ultimately DKIM is a good move for the internet community at large, especially when combined with SPF. DKIM mail is assured to come from the sender and can be cryptographically proven so. While it does take more take a little more effort to setup and maintain it assures mail from your domain is secure and can be assured to have come from you or your company. Ultimately DKIM can protect your company against phishing attempts and boost your spam scores.</p>
<p><strong>Random thought:</strong> What would Email look like if it were designed today?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.danielhall.me/2010/07/protecting-email-with-dkim/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Google&#8217;s Privacy Bungle</title>
		<link>http://www.danielhall.me/2010/06/googles-privacy-bungle/</link>
		<comments>http://www.danielhall.me/2010/06/googles-privacy-bungle/#comments</comments>
		<pubDate>Sat, 05 Jun 2010 03:37:27 +0000</pubDate>
		<dc:creator>Daniel</dc:creator>
				<category><![CDATA[Computing]]></category>
		<category><![CDATA[Encryption]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Hacking]]></category>
		<category><![CDATA[Privacy]]></category>
		<category><![CDATA[Wifi]]></category>
		<category><![CDATA[Wireless]]></category>

		<guid isPermaLink="false">http://www.danielhall.me/?p=621</guid>
		<description><![CDATA[Google has recently taken a large amount of criticism for capturing unencrypted wireless network traffic as part of its Street View project. Google admitted to the world that although it was only looking to capture station MAC addresses it inadvertently &#8230;<p class="read-more"><a href="http://www.danielhall.me/2010/06/googles-privacy-bungle/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<p>Google has recently taken a large amount of criticism for capturing  unencrypted wireless network traffic as part of its Street View project.  Google admitted to the world that although it was only looking to  capture station MAC addresses it inadvertently also captured the payload  data. Many articles have emerged blasting Google for what Senator  Conroy calls &#8216;This is probably the single greatest breach in the history of privacy&#8217;. I believe Google hasn&#8217;t done all that wrong, to  understand why you need to know how a wireless network works.</p>
<p>Wireless networks can either be encrypted or unencrypted but in both  these cases only the payload is encrypted. The packet headers which  contain information about who the packet is addressed to and who it is  from. The reasons for this are similar to why you might write a letter  in code, but you would not write the envelope in code. In an unencrypted  network the whole packet is sent in clear text including the envelope  and contents. The difference between these analogies and how a real  network works though is that to read the envelope you need to physically  obtain it and there is only one copy. A wireless network broadcasts  everything to everyone within 100 meters.</p>
<p>This isn&#8217;t really a problem if your network is encrypted as people will  not be able to read it easily. If however your network is not encrypted  its the equivalent of yelling out everything that you type into and read  from your PC. Almost all banking websites will ask your PC to use extra  encryption, but many other sites will not. So anyone in a 100 meter  range of your computer or access point can watch everything you do on  your computer.</p>
<p>What Google were trying to do was get a list of the locations of these  access points. So they would have captured the headers of all packets  they saw, grabbed the wireless routers address out of it and marked its  location on a map. Except according to them they accidentally put code in  that captured the whole packet. This meant that for all the unencrypted  networks the Google Street View cars drove past they may have captured  private information.</p>
<p>There is a class action in Germany against Google for capturing this  data, and more can be expected elsewhere soon. Suing Google for this is  like walking in to a public place, yelling out a bunch of private  information and then suing anyone who happened to be recording at the  time, or suing someone for writing down smoke signals you send to someone from the top of a mountain. If your  access point is sending data unencrypted then every wireless device  within 100 meters cannot help but hear your data, you&#8217;re just lucky most  will ignore it.</p>
<p>If you really cared about your privacy you would at least make some  attempt to restrict others access to your data. Not knowing is much an  excuse as not knowing people were recording in that shopping mall. Don&#8217;t  take your privacy for granted, check whether your network is encrypted,  and if you don&#8217;t know how, get someone who does. Ignorance is not an  excuse! This time it was Google, the next time it could be an identity  thief.</p>
<p><strong>Random Thought:</strong> If privacy is so important to people at the moment, what&#8217;s with all the data on Facebook?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.danielhall.me/2010/06/googles-privacy-bungle/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Cross-Domain AJAX</title>
		<link>http://www.danielhall.me/2010/05/cross-domain-ajax/</link>
		<comments>http://www.danielhall.me/2010/05/cross-domain-ajax/#comments</comments>
		<pubDate>Tue, 04 May 2010 21:21:58 +0000</pubDate>
		<dc:creator>Daniel</dc:creator>
				<category><![CDATA[Web Programming]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Perl]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Web Services]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://www.danielhall.me/?p=499</guid>
		<description><![CDATA[When making an xmlhttprequest from a website the browser will restrict you to the site from which the script came. This is a security precaution. If sites were able to tell the browser to make requests from other domains then &#8230;<p class="read-more"><a href="http://www.danielhall.me/2010/05/cross-domain-ajax/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<p>When making an xmlhttprequest from a website the browser will restrict you to the site from which the script came. This is a security precaution. If sites were able to tell the browser to make requests from other domains then they would be able to DDOS a site with a users browser. There are legitimate reasons to make requests to other sites though.</p>
<p>Many sites offer web services, xml data and json encoded data. These can provide almost anything from the weather, to search results, to advanced APIs. To use these services from your site using javascript you&#8217;ll have to employ one of the methods below.</p>
<h1>Signing Javascript</h1>
<p>Firefox allows you to sign your Javascript and place it in a jar file. This will give your code more privileges, You can also request these permissions explicitly without having your code signed, but having a dialog box appear for every AJAX request could get very tiring for the user. Another problem with this approach is that it isn&#8217;t documented very well and its Firefox specific. The first link in the references section deals with this method.</p>
<h1>Access-Control Headers</h1>
<p>This is the w3 approved method of allowing a client from another domain to access your web service. It is a server side method and requires no changes on the client to implement. This is both and advantage and a disadvantage. If you have control over the server then this method is simple, otherwise (for sites such as Yahoo API or other public services) you will not be able to implement this. It should also be noted that this was implemented in Firefox 3.5 so it can&#8217;t be used with earlier versions, or other browsers.</p>
<p>To use this method you tell your service to output extra headers that tell the browser whether access was allowed or denied.</p>
<h1>Flash Enabled xmlhttprequest</h1>
<p>This method involves using an invisible flash player to perform the actual request then handing the result back to the Javascript for processing. Flash still performs permission checking by looking for a /crossdomain.xml file in the root directory of the domain the request is being made to. There are several libraries that implement this approach and a few even implement in a way which is compatible with xmlhttprequest. One downside is this Flash is required, though recently Flash is required for several major sites and most browsers will have it installed.</p>
<h1>Add Sites To Trusted Zone</h1>
<p>Internet Explorer allows and denies cross-domain based xmlhttprequests based on the security setting. This approach is likely not going to be used on the Internet as it requires user interaction and is Internet Explorer specific. On a corporate Intranet this is slightly less difficult but not by much.</p>
<h1>Apache mod_proxy</h1>
<p>With this method you use the same server you shared the page from to proxy the requests automatically to the server with the data you&#8217;re fetching. For this to work your version of Apache has to be compiled with proxy support or you need to have the mod_proxy dso loaded. This method increases the latency of requests as they must first go via your server. It should also be noted that this cannot be implemented in .htaccess file and must be done in the main configuration.</p>
<h1>Manual Proxy</h1>
<p>If you don&#8217;t have control over your servers configuration then you can mimic the above method by writing a script that forwards the variables required and forwards back the data. This approach can even be more preferable than the above method as it allows you to preprocess the variables and cache the data if required.</p>
<h1>References</h1>
<p><a href="http://www.mozilla.org/projects/security/components/signed-scripts.htm">http://www.mozilla.org/projects/security/components/signed-scripts.htm</a>l</p>
<p><a href="http://dev.w3.org/2006/waf/access-control/">http://dev.w3.org/2006/waf/access-control/</a></p>
<p><a href="http://developer.yahoo.com/javascript/howto-proxy.html">http://developer.yahoo.com/javascript/howto-proxy.html</a></p>
<p><a href="https://developer.mozilla.org/En/HTTP_Access_Control">https://developer.mozilla.org/En/HTTP_Access_Control</a></p>
<p><a href="http://ejohn.org/blog/cross-site-xmlhttprequest/">http://ejohn.org/blog/cross-site-xmlhttprequest/</a></p>
<p><a href="http://ajaxpatterns.org/XMLHttpRequest_Call">http://ajaxpatterns.org/XMLHttpRequest_Call</a></p>
<p><a href="http://ajaxpatterns.org/Flash-enabled_XHR">http://ajaxpatterns.org/Flash-enabled_XHR</a></p>
<p><strong>Random Thought:</strong> Can you use AJAX to make web applications cleaner?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.danielhall.me/2010/05/cross-domain-ajax/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Using EncFS to encrypt your files</title>
		<link>http://www.danielhall.me/2010/04/using-encfs-to-encrypt-your-files/</link>
		<comments>http://www.danielhall.me/2010/04/using-encfs-to-encrypt-your-files/#comments</comments>
		<pubDate>Tue, 27 Apr 2010 20:53:38 +0000</pubDate>
		<dc:creator>Daniel</dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[Encryption]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.danielhall.me/?p=546</guid>
		<description><![CDATA[About EncFS EncFS is an encrypted filesystem based on FUSE. It transparently encrypts files stored in it and places them on another volume. This is in contrast to block level encrypted filesystems which transparently encrypt the data under the filesystem &#8230;<p class="read-more"><a href="http://www.danielhall.me/2010/04/using-encfs-to-encrypt-your-files/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<h1>About EncFS</h1>
<p>EncFS is an encrypted filesystem based on FUSE. It transparently encrypts files stored in it and places them on another volume. This is in contrast to block level encrypted filesystems which transparently encrypt the data under the filesystem layer as it is being written to disk. Think of EncFS as a bind mount, except that the source for the mount is encrypted and the place it is mounted to is the only place it is available unencrypted.</p>
<p>The main advantage of EncFS filesystems is that when backing up only the files which have changed need to be backed up. This means it works perfectly with tools such as rsnapshot. Another advantage is that the filesystem doesn&#8217;t need a block of disk allocated to it and will shrink and expand as the files inside change.</p>
<p>Finally because this is all implemented with FUSE it is all done in userspace. No root access is required (apart from setting FUSE up) to create and alter encfs filesystems.</p>
<h2>Setting Up an EncFS Volume</h2>
<p>So the first thing you need to do to setup an encfs volume is to install FUSE and EncFS. If you don&#8217;t have root access you will have to ask your sysadmin to do this for you, otherwise follow your distribution specific method of installing new packages. On Fedora it is called &#8216;fuse-encfs&#8217; and on Debian/Ubuntu its called &#8216;encfs&#8217;. On some older systems users wishing to use FUSE may need to be added to the correct group.</p>
<p>First you need to decide where you will put the encfs volume, and where you&#8217;ll mount it. I usually put mine in /home/daniel/.crypt and mount it to /home/daniel/crypt. But feel free to name it whetever you want. When you&#8217;ve decided run the EncFS with those arguments, for example to use the example I specified it would look like this:</p>
<pre class="brush: plain; title: ; notranslate">
&lt;daniel@server ~&gt;$ encfs /home/daniel/.crypt /home/daniel/crypt
The directory &quot;/home/daniel/.crypt/&quot; does not exist. Should it be created? (y,n) y
The directory &quot;/home/daniel/crypt&quot; does not exist. Should it be created? (y,n) y
Creating new encrypted volume.
Please choose from one of the following options:
 enter &quot;x&quot; for expert configuration mode,
 enter &quot;p&quot; for pre-configured paranoia mode,
 anything else, or an empty line will select standard mode.
?&gt;

Standard configuration selected.

Configuration finished.  The filesystem to be created has
the following properties:
Filesystem cipher: &quot;ssl/aes&quot;, version 2:2:1
Filename encoding: &quot;nameio/block&quot;, version 3:0:1
Key Size: 192 bits
Block Size: 1024 bytes
Each file contains 8 byte header with unique IV data.
Filenames encoded using IV chaining mode.
File holes passed through to ciphertext.

Now you will need to enter a password for your filesystem.
You will need to remember this password, as there is absolutely
no recovery mechanism.  However, the password can be changed
later using encfsctl.

New Encfs Password:
Verify Encfs Password:
</pre>
<p>As you can see the directories don&#8217;t need to be created first. There is also a prompt for what security settings you want to use. Hitting enter will give you standard settings, but for something more powerful you should hit &#8216;p&#8217; then enter. You can now proceed to place files in /home/daniel/crypt and they will be encrypted and placed into /home/daniel/.crypt. If you don&#8217;t believe me go ahead and check.</p>
<p>See? I told you so. Now you can unmount it using &#8216;fusermount -u /home/daniel/crypt&#8217; and mount it again using <span style="font-family: Consolas, Monaco, 'Courier New', Courier, monospace; line-height: 18px; font-size: 12px; white-space: pre;">encfs /home/daniel/.crypt /home/daniel/crypt and typing your password.</span></p>
<p><strong>Random Thought:</strong> When travelling to other countries, local laws may mean that customs can search your laptop, including encrypted filesystems. You may have to reveal your key, or be arrested.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.danielhall.me/2010/04/using-encfs-to-encrypt-your-files/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Australian Mandatory Internet Filter</title>
		<link>http://www.danielhall.me/2010/04/the-australian-mandatory-internet-filter/</link>
		<comments>http://www.danielhall.me/2010/04/the-australian-mandatory-internet-filter/#comments</comments>
		<pubDate>Tue, 20 Apr 2010 09:39:40 +0000</pubDate>
		<dc:creator>Daniel</dc:creator>
				<category><![CDATA[The Internet]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[No Clean Feed]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.danielhall.me/?p=564</guid>
		<description><![CDATA[I&#8217;m ashamed that in today&#8217;s society I have to begin this post with this paragraph but I have to nonetheless. For the record I am absolutely opposed to child pornography, bestiality, sexual violence and rape. I am abhorred that people &#8230;<p class="read-more"><a href="http://www.danielhall.me/2010/04/the-australian-mandatory-internet-filter/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m ashamed that in today&#8217;s society I have to begin this post with this paragraph but I have to nonetheless. For the record I am absolutely opposed to child pornography, bestiality, sexual violence and rape. I am abhorred that people are involved in the production and distribution of such material and I strongly feel that these people need to be brought to justice. I feel strongly that the government needs to implement measures to catch and prosecute these people and to make such material impossible to produce or distribute. I do however believe that the Mandatory Internet Filter as proposed by Steven Conroy is the wrong way to go about this.</p>
<p>The Internet filter, quite simply put is technically infeasible. The filter will work by directing all requests from Australian users towards a site containing RC content to a filtering device. This device then relays all requests to that site to the actual server, unless a requests is made for a blocked page, which will instead return a page indicating the site is blocked. This is similar to the way the firewall in China and other countries with a national Internet filter. This method is effective in that it is often 100% effective (which means that every page on the blocked list is blocked, with no false positives) when done right. There is a problem however, this method does not scale well. If the government were to block a page on a large site (as was attempted to Wikipedia in the UK) then the filter would not be able to handle the load. Secondly it appears to the administrators of that site that all requests are coming from a few IP adresses. This could cause Wikipedia to eventually block all Australians either because the requests will look similar to a DDOS or because they have no way to distinguish between users and need to prevent abuse. Although the filter may be 100% accurate at blocking web traffic it will not be capable of dealing with many other varieties of Internet data.</p>
<p>The proposed filter will only be capable of filtering standard web traffic from web browsers. The Internet consists of a large number of computers talking in any number of protocols. While web traffic is one of these there are many other ways to exchange information. This filter will not be capable of filtering email, bit torrent, edonkey, gnutella, XMPP, DDC, SSH, VPN, TOR and that is only naming a small portion. Many people caught to have been in possession of child pornography and other illegal content are found to have downloaded it via peer to peer technology. This is because standard web traffic makes it easy to trace and identify the owner, where as peer to peer traffic can be hidden much easier. Secondly web traffic can be &#8216;tunnelled&#8217; or hidden inside these other protocols and this way completely bypass the filter. This means anyone with sufficient knowledge or five minutes to learn will be able to configure their PC to hide their data amongst an SSH or VPN connection. These technical arguments come from my experience as a systems Administrator, but there are other arguments not so technical.</p>
<p>Steven Conroy has said that the filter will only deal with RC rated content, however there is no transparency about what will be blocked. The government can&#8217;t publish a list of sites that are blocked because that will effectively give people looking for this content a list of places to find it. Without knowing what sites are being blocked we won&#8217;t know if or when the government decides that they would like to start blocking sites that are debating for or against abortion, euthanasia or any other politically sensitive topic. It may be interesting to know that the definition for RC content includes pages instructing in any crime, which would include euthanasia. A representative for Steven Conroy has specifically stated the filter won&#8217;t be filtering pages related to euthanasia but because of this broad definition it could be changed at any time and we wouldn&#8217;t know until after the material was blocked.</p>
<p>I am a Unix Systems Administrator, and for the reasons listed above, and more covered better by other bloggers, I am opposed to the filter proposed by Senator Steven Conroy and the Labor government. I urge my readers who are also opposed to the filter to write to your local MP, to Senator Conroy, to Tony Smith (Shadow Minister Minister for Broadband, Communications<br />
and the Digital Economy). If all else fails and the Government does not see sense then use your vote. The filter will not work and will waste taxpayer money that could be used in many better ways.</p>
<p><strong>Random Thought:</strong> Will posting instructions about how to bypass the filter be illegal?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.danielhall.me/2010/04/the-australian-mandatory-internet-filter/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

