<?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>trivia &#187; networks and networking</title>
	<atom:link href="http://baldric.net/category/networks-and-networking/feed/" rel="self" type="application/rss+xml" />
	<link>http://baldric.net</link>
	<description>another voice in the babble on the net</description>
	<lastBuildDate>Sun, 25 Jul 2010 20:17:35 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>scroogle is having a problem</title>
		<link>http://baldric.net/2010/07/04/scroogle-is-having-a-problem/</link>
		<comments>http://baldric.net/2010/07/04/scroogle-is-having-a-problem/#comments</comments>
		<pubDate>Sun, 04 Jul 2010 20:26:42 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[networks and networking]]></category>
		<category><![CDATA[privacy]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[trivial musing]]></category>

		<guid isPermaLink="false">http://baldric.net/?p=582</guid>
		<description><![CDATA[I posted a note about scroogle back in January. Scroogle offered an SSL interface to the google engine, and, moreover, didn&#8217;t lumber its users with google cookies and sundry other irritations. Since then, however, google themselves have started to offer an SSL interface and, coincidentally, scroogle seem to have started to have some problems. If [...]]]></description>
			<content:encoded><![CDATA[<p>I posted a note about scroogle back in <a href="http://baldric.net/2010/01/02/using-scroogle/">January</a>. Scroogle offered an SSL interface to the google engine, and, moreover, didn&#8217;t lumber its users with google cookies and sundry other irritations. Since then, however, google themselves have started to offer an SSL interface and, coincidentally, scroogle seem to have started to have some <a href="http://www.theregister.co.uk/2010/07/02/scroogle_no/">problems.</a></p>
<p>If you visit the scroogle SSL interface, you get a <a href="https://ssl.scroogle.org/cgi-bin/nbbwssl.cgi">redirect</a> to a notice which explains why some changes made at google mean that scroogle can no longer work properly. Scroogle managed to get a workaround  in place for a few days, but it seems that another google change has finally killed that too unless google can be convinced to help out &#8211; unlikely in my view. The scroogle redirect page (dated 1 July 2010) has the following line from Daniel Brandt:</p>
<blockquote><p>&#8220;Thank you for your support during these past five years. Check back in a week or so; if we don&#8217;t hear from Google by next week, I think we can all assume that Google would rather have no Scroogle, and no privacy for searchers.&#8221;</p></blockquote>
<p>That in itself is bad enough, but as a separate new <a href="http://www.scroogle.org/botnote.html">posting</a> explains, scroogle now seems to be the target of a botnet aimed at swamping its servers. As Brandt goes on to say:</p>
<blockquote><p>&#8220;Google has a few hundred thousand servers, while Scroogle has six. They can put up with sites that spread malware, but our bandwidth is limited. Even if Google relents and the output=ie interface returns, this Scroogle malware problem could still be increasing at that point. Eventually it alone might shut down Scroogle.&#8221;</p></blockquote>
<p>Sad. I hate to see the little guy lose out.</p>
]]></content:encoded>
			<wfw:commentRss>http://baldric.net/2010/07/04/scroogle-is-having-a-problem/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>webDAV in lighttpd on debian</title>
		<link>http://baldric.net/2010/03/31/webdav-in-lighttpd-on-debian/</link>
		<comments>http://baldric.net/2010/03/31/webdav-in-lighttpd-on-debian/#comments</comments>
		<pubDate>Wed, 31 Mar 2010 21:11:45 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[linux and unix]]></category>
		<category><![CDATA[networks and networking]]></category>
		<category><![CDATA[tips, tricks and howtos]]></category>
		<category><![CDATA[trivial musing]]></category>

		<guid isPermaLink="false">http://baldric.net/?p=519</guid>
		<description><![CDATA[I back up all my critical files to one of my slugs using rsync over ssh (and just because I am really cautious I back that slug up to another NAS). Most of the files I care about are the obvious photos of friends and family. I guess that most people these days will have [...]]]></description>
			<content:encoded><![CDATA[<p>I back up all my critical files to one of my slugs using rsync over ssh (and just because I am really cautious I back that slug up to another NAS). Most of the files I care about are the obvious photos of friends and family. I guess that most people these days will have large collections of jpeg files on their hard disks whereas previous generations (including myself I might add) would have old shoe boxes filled with photographs. </p>
<p>The old shoe box approach has much to recommend it. Not least the fact that anyone can open that box and browse the photo collection without having to think about user ids or passwords, or having to search for a some way of reading the medium holding the photograph. I sometimes worry about how future generations&#8217; lives will be subtly impoverished by the loss of the serendipity of discovery of said old shoe box in the attic. Somehow the idea of the discovery of a box of old DVDs doesn&#8217;t feel as if it will give the discoverer the immediate sense of delight which can follow from opening a long forgotten photo album.  Old photographs feel &#8220;real&#8221; to me in a way that digital images will never do. In fact the same problem affects other media these days. I am old enough (and sentimental enough) to have a stash of letters from friends and family past. These days I communicate almost exclusively via email and SMS. And I feel that I have lost some part of me when I lose some old messages in the transfer from one &#8216;phone to another or from one computing environment to another. </p>
<p>In order to preserve some of the more important photographs in my collection I print them and store them in old fashioned albums. But that still leaves me with a huge number of (often similar) photographs in digital form on my PC&#8217;s disk. As I said, I back those up regularly, but my wife pointed out to me that only I really know where those photos are, and moreover, they are on media which are password protected. What happens if I fall under a bus tomorrow? She can&#8217;t open the shoebox.</p>
<p>Now given that all the photos are on a networked device, it is trivially easy to give her acccess to those photos from her PC. But I don&#8217;t like samba, and NFS feels like overkill when all she wants is read-only access to a directory full of jpegs. The slug is already running a web server and her gnome desktop conveniently offers the capability to connect to a remote server over a variety of different protocols, including the rather simple option of WebDAV. So all I had to do was configure lighty on the slug to give her that access.</p>
<p>Here&#8217;s how:-</p>
<p>If not already installed, then run aptitude to install &#8220;lighttpd-mod-webdav&#8221;. If you want to use basic authenticated access then it may also be useful to install &#8220;apache2-utils&#8221; which will give you the apache htpasswd utility.  The htpasswd authentication function uses unix crypt and is pretty weak, but we are really only concerned here with limiting browsing of the directory to local users on the local network, and if someone has access to my htpasswd file then file I&#8217;ve got bigger problems than just worrying about them browsing my photos. There are other authentication mechanisms we can use in lighty if we really care &#8211; although I would argue that if you really want to protect access to a network resource you shouldn&#8217;t be providing web access in the first place.</p>
<p>To enable the webdav and auth modules, you can simply  run &#8220;lighty-enable-mod webdav&#8221; and &#8220;lighty-enable-mod auth&#8221; (which actually just create symlinks from the relevant files in /etc/lighttpd/conf-available to /etc/lighttpd/conf-enabled directories) or you can activate the modules directly in /etc/lighttpd/lighttpd.conf or the appropriate virtual-host configuration file with the directives:</p>
<blockquote><p>server.modules                += ( &#8220;mod_auth&#8221; )<br />
server.modules                += ( &#8220;mod_webdav&#8221; )</p></blockquote>
<p>lighty is pretty flexible and doesn&#8217;t really care where you activate the modules. The advantage of using the &#8220;lighty-enable-mod&#8221; approach however, is that it allows you to quickly change by running &#8220;lighty-disable-mod whatever&#8221; at a future date. The symlink will then be removed and so long as you remember to restart lighty, the module activation will cease.</p>
<p>Now to enable the webdav access to the directory in question we need to configure the virtual host along the following lines:</p>
<blockquote><p>$HTTP["host"] == &#8220;slug&#8221; {<br />
# turn off directory listing (assuming that it is on by default elsewhere)<br />
server.dir-listing      = &#8220;disable&#8221;</p>
<p># turn on webdav on the directory we wish to share<br />
$HTTP["url"] =~ &#8220;^/photos($|/)&#8221; {<br />
    webdav.activate = &#8220;enable&#8221;<br />
    webdav.is-readonly = &#8220;enable&#8221;<br />
    webdav.sqlite-db-name = &#8220;/var/run/lighttpd/lighttpd.webdav_lock.db&#8221;<br />
    auth.backend = &#8220;htpasswd&#8221;<br />
    auth.backend.htpasswd.userfile = &#8220;/etc/lighttpd/htpasswd&#8221;<br />
    auth.require = ( &#8220;&#8221; => ( &#8220;method&#8221; => &#8220;basic&#8221;,<br />
                             &#8220;realm&#8221; => &#8220;photos&#8221;,<br />
                             &#8220;require&#8221; => &#8220;valid-user&#8221; ) )<br />
  }</p>
<p>}</p></blockquote>
<p>Note that the above configuration will allow any named user listed in the file /etc/lighttpd/htpasswd read only access to the &#8220;/photos&#8221; directory on the virtual host called &#8220;slug&#8221; if they can sucessfully authenticate. Note also, however, that because directory listing is turned off, it will not be possible for that user to access this directory with a web browser (which would be possible if listing were allowed). Happily however, the gnome desktop (&#8220;Connect to server&#8221; mechanism) will still permit authenticated access and once connected will provide full read only access to all files and subdirectories of &#8220;/photos&#8221; in the file browser (which is what we want). The &#8220;auth.backend&#8221; directive tells lighty that we are using the apache htpasswd authentication mechanism and the file can be found at the location specified (make sure this is outside webspace). the &#8220;auth.require&#8221; directives specify the authentication method (bear in mind that &#8220;basic&#8221; is clear text, albeit base64 encoded, so authenticatiion credentials can be trivially sniffed off the network); the &#8220;realm&#8221; is a string which will be displayed in the dialogue box presented to the user (though it has additional functions if <a href="http://redmine.lighttpd.net/wiki/1/Docs:ModAuth">digest authentication</a> is used); &#8220;require&#8221; specifies which authenticated users are allowed access. This can be useful if you have a single htpasswd file for multiple virtual hosts (or directories) and you wish to limit access to certain users. </p>
<p>Passing authentication credentials in clear over a hostile network is not smart, so I would not expose this sort of configuration to the wider internet. However, the webDAV protocol supports ssl encryption so it would be easy to secure the above configuration by changing the setup to use lighty <a href="http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs:SSL">configured for ssl</a>. I choose not to here because of the overhead that would impose on the slug when passing large photographic images &#8211; and I trust my home network&#8230;&#8230;  </p>
<p>Now given that we have specified a password  file called &#8220;htpasswd&#8221; we need to create that file in the &#8220;/etc/lighttpd&#8221; configuration directory thusly:</p>
<blockquote><p>httpasswd -cm /etc/lighttpd/htpasswd user</p></blockquote>
<p>The -c switch to htpasswd creates the file if it does not already exist. When adding any subsequent users you should omit this switch or the file will be recreated (and thus overwritten). The &#8220;user&#8221; name adds the named user to the file. You will be prompted for the password for that user after running the command. As I mentioned above, by default the password will only be encrypted by crypt, the -m switch used forces htpasswd to use (the stronger) MD5 hash. Note that htpasswd also gives the option of SHA (-s switch) but this is not supported by lighty in <a href="http://redmine.lighttpd.net/wiki/1/Docs:ModAuth">htpasswd authentication</a>. Make sure that the passwd file is owned by root and is not writeable by non root users (&#8220;chown root:root htpasswd; chmod 644 htpasswd&#8221; if necessary).</p>
<p>The above configuration also assumes that the files you wish to share are actually in the directory called &#8220;photos&#8221; in the web root of the virtual host called &#8220;slug&#8221;. In my case this is not true because I have all my backup files outside the webspace on the slug (for fairly obvious reasons). In order to share the files we simply need to provide a symlink to the relevant directory outside webspace.</p>
<p>Now whenever the backup is updated, my wife has access to the latest copy of all the photos in the shoebox. But let&#8217;s hope I don&#8217;t fall under a bus just yet.</p>
]]></content:encoded>
			<wfw:commentRss>http://baldric.net/2010/03/31/webdav-in-lighttpd-on-debian/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>unplugged</title>
		<link>http://baldric.net/2010/03/30/unplugged/</link>
		<comments>http://baldric.net/2010/03/30/unplugged/#comments</comments>
		<pubDate>Tue, 30 Mar 2010 15:28:44 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[electronics]]></category>
		<category><![CDATA[linux and unix]]></category>
		<category><![CDATA[networks and networking]]></category>
		<category><![CDATA[tips, tricks and howtos]]></category>
		<category><![CDATA[trivial musing]]></category>

		<guid isPermaLink="false">http://baldric.net/?p=508</guid>
		<description><![CDATA[My earlier problems with the sheevaplug all seem to have stemmed from the fact that I had installed Lenny to SDHC cards. As I mentioned in my post of 7 March, I burned through two cards before eventually giving up and trying a new installation to USB disk. This seems to have fixed the problem [...]]]></description>
			<content:encoded><![CDATA[<p>My earlier problems with the sheevaplug all seem to have stemmed from the fact that I had installed Lenny to SDHC cards. As I mentioned in my post of 7 March, I burned through two cards before eventually giving up and trying a new installation to USB disk. This seems to have fixed the problem and my plug is now stable. I had a series of problems with the SD cards I used (class 4 SDHC 8 GB cards) which may have been related to the quality of the cards I used. Firstly the root filesystem would often appear as readonly and the USB drive holding my apt-mirror (mounted as /home2) would similarly appear to be mounted read-only. This seemed to occur about every other day and suggested to me that the plug had seen a problem of some kind and rebooted. But of course since the filesystem was not writeable, there were no logs available to help my investigations. </p>
<p>I persevered for around two weeks during which time I completely rebuilt both the original SD card and another with Martin&#8217;s <a href="http://www.cyrius.com/debian/kirkwood/sheevaplug/unpack.html">tarball</a>, reflashed uboot with the latest from his site, and reset the uboot environment to the factory defaults before trying again. I also changed /etc/fstab to take out the &#8220;errors=remount-ro&#8221; entry against the root filesystem, and reduced the number of writes to the card by adding &#8220;noatime, commit=180&#8243; in the hope that I could a) gain stability, and b) find out what was going wrong. No joy. I still came home to a plug with a /home2 that was either unmounted or completely unreadable or mounted RO. The disk checked out fine on another machine and I could find nothing obvious in the logs to suggest why the damned thing was failing in the first place. Martin&#8217;s site says that &#8220;USB support in u-boot is quite flaky&#8221;. My view is somewhat stronger than that, particularly when the plug boots from another device and then attaches a USB disk. </p>
<p>But I don&#8217;t give up easily. After getting nowhere with the SDHC card installation from Martin&#8217;s tarball, I reset the uboot environment on the plug to the factory default (again) and then ran a network installation of squeeze to a 1TB USB disk (following Martin&#8217;s <a href="http://www.cyrius.com/debian/kirkwood/sheevaplug/install.html">howto</a>). It took me two attempts (I hit the <a href="http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=530909">bug</a> in the partitioner on the first installation) but I now have a stable plug running squeeze. It is worth noting here that I had to modify the uboot &#8220;bootcmd&#8221; environment variable to include a reset (as Martin suggests may be necessary) so that the plug will continue to retry after a boot failure until it eventually loads. The relevant line should read:  </p>
<blockquote><p>setenv bootcmd &#8216;setenv bootargs $(bootargs_console); run bootcmd_usb; bootm 0&#215;00800000 0&#215;01100000; reset&#8217;
</p></blockquote>
<p>The plug now boots successfully every second or third attempt. So far it has been up just over ten days now without any of the earlier problems recurring.</p>
<p>My experience appears not to be all that unusual. There has been some considerable discussion on the debian-arm list of late about problems with installation to SDHC cards. Most commentators conclude that wear levelling on the cards (particularly cheap ones) may not be very good. SD cards are sold formatted as FAT or FAT32 (depending on the capacity of the card). Modern journalling filesystems such as ext3 on linux result in much higher read/write rates and the quality of the cards becomes a much greater concern. Perhaps my cards just weren&#8217;t good enough.</p>
]]></content:encoded>
			<wfw:commentRss>http://baldric.net/2010/03/30/unplugged/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>plug instability</title>
		<link>http://baldric.net/2010/03/07/plug-instability/</link>
		<comments>http://baldric.net/2010/03/07/plug-instability/#comments</comments>
		<pubDate>Sun, 07 Mar 2010 19:59:50 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[electronics]]></category>
		<category><![CDATA[linux and unix]]></category>
		<category><![CDATA[networks and networking]]></category>
		<category><![CDATA[tips, tricks and howtos]]></category>
		<category><![CDATA[trivial musing]]></category>

		<guid isPermaLink="false">http://baldric.net/?p=488</guid>
		<description><![CDATA[I&#8217;m still having a variety of problems with my sheevaplug. Not least of which is the fact that SDHC cards don&#8217;t seem to be the best choice of boot medium. I have had failures with two cards now and some searching of the various on-line fora suggests that I am not alone here. In particular, [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m still having a variety of problems with my sheevaplug. Not least of which is the fact that SDHC cards don&#8217;t seem to be the best choice of boot medium. I have had failures with two cards now and some searching of the various on-line fora suggests that I am not  alone here. In particular, SD cards seem to suffer badly under the read/write load that is routine for an OS writing log files &#8211; let alone one running a file or web server. I have also had several failures with my external USB drive. It seems that the plug boots too quickly for the USB subsystem to initialise properly. This means that there is not enough time for the relevant device file (/dev/sda1 in my case) to appear before /etc/fstab is read to mount the drive. A posting on the <a href="http://plugcomputer.org/plugforum/index.php?PHPSESSID=6547feecf243aec9ea4b53ed652a8a05&#038;topic=485.0">plugcomputer.org </a>forum suggested a useful workaround (essentially introducing a wait), but even that was only partially sucessful. Sometimes it worked, sometimes it didn&#8217;t.  In fact, the USB drive still often fails after a random (and short) time and then remounts read-only. Attempts to then remount the drive manually (after a umount) result in failure with the error message &#8220;mount: special device /dev/sda1 does not exist&#8221;.  </p>
<p>In my attempts to cure both the booting problems and the USB connection failures I have installed the <a href="http://www.cyrius.com/debian/kirkwood/sheevaplug/uboot-upgrade.html">latest uboot</a> (3.4.27 with pingtoo patches linked to from Martin&#8217;s site) and updated my lenny kernel to Martin&#8217;s <a href="http://people.debian.org/~tbm/orion">2.6.32-2-kirkwood</a>  in the (vain as it turns out) hope that the latest software would help. Here I also discovered another annoying problem &#8211; installing the latest kernel does not result in a new kernel image, the plug still boots into the old kernel until you run &#8220;flash-kernel&#8221;. Fortunately this is reasonably well known and is covered in Martin&#8217;s <a href="http://www.cyrius.com/debian/kirkwood/sheevaplug/troubleshooting.html">troubleshooting</a> page.</p>
<p>I will persevere for perhaps another week with the current plug configuration. If I can&#8217;t get a stable system though I will try installing to USB drive (perverse as that may seem) and changing the uboot to boot from that rather than the flaky SD card. Most on-line advice suggests that USB support in uboot is rather &#8220;immature&#8221;, but it can&#8217;t be any worse than the current setup. My thinking is that if I can introduce a delay in the boot process by uboot so that I can successfully boot from an external HDD, the drive connection might then be stable enough to be usable.</p>
<p>Of course I could be completely wrong.</p>
]]></content:encoded>
			<wfw:commentRss>http://baldric.net/2010/03/07/plug-instability/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>from slug to plug</title>
		<link>http://baldric.net/2010/02/28/from-slug-to-plug/</link>
		<comments>http://baldric.net/2010/02/28/from-slug-to-plug/#comments</comments>
		<pubDate>Sun, 28 Feb 2010 21:49:28 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[electronics]]></category>
		<category><![CDATA[linux and unix]]></category>
		<category><![CDATA[networks and networking]]></category>
		<category><![CDATA[tips, tricks and howtos]]></category>
		<category><![CDATA[trivial musing]]></category>

		<guid isPermaLink="false">http://baldric.net/?p=473</guid>
		<description><![CDATA[Well this took rather longer than expected. I intended to write about my latest toy much earlier than this, but several things got in the way &#8211; more of which later. About three or four weeks ago I bought myself a new sheevaplug. The plug has been on sale in the US for some time, [...]]]></description>
			<content:encoded><![CDATA[<p>Well this took rather longer than expected. I intended to write about my latest toy much earlier than this, but several things got in the way &#8211; more of which later. </p>
<p>About three or four weeks ago I bought myself a new <a href="http://www.globalscaletechnologies.com/p-22-sheevaplug-dev-kit-us.aspx">sheevaplug.</a> </p>
<p><a href="http://baldric.net/wp-content/uploads/2010/02/SheevaPlug2b_small1.jpg"><img src="http://baldric.net/wp-content/uploads/2010/02/SheevaPlug2b_small1.jpg" alt="image of sheevaplug" title="SheevaPlug" width="250" height="187" class="size-full wp-image-476" /></a></p>
<p>The plug has been on sale in the US for some time, but UK shipping costs added significantly to $99 US retail price.  Recently however, a UK supplier (<a href="http://www.newit.co.uk/">Newit</a>) has started stocking and selling the plugs over here &#8211; and at very good prices too. My plug arrived within three days of order and I can thoroughly recommend Newit. The owner, one Jason King no less (fans of 1970&#8242;s TV will recognise the name), kept me informed of progress from the time I placed the order to the time it was shipped. He even took the trouble to email me after shipping to check that I had received it OK. Nice touch, even if it was automated.</p>
<p>Looking much like a standard &#8220;wall wart&#8221; power supply typically attached to an external disk, the plug is actually quite chunky, but it will still fit comfortably in the palm of your hand. Inside that little box though there is enough computing power to make a slug owner more than happy. The processor is a 1.2 GHz Marvell Kirkwood ARM-compatible device and it is coupled with 512MB SDRAM and 512MB Flash memory.  Compare that to the poor old slug&#8217;s 266 MHz processor and 32 MB of flash and you can see why I&#8217;d be interested &#8211; particularly since the plug can run debian (and <a href="http://www.cyrius.com/debian/kirkwood/sheevaplug/">Martin Michlmayr</a> has again provided a <a href="http://www.cyrius.com/debian/kirkwood/sheevaplug/unpack.html">tarball and instructions</a> to help you out.  </p>
<p>The plugs come in a variety of flavours, but all offer at least one USB 2.0 port, a mini usb serial port, gigabit ethernet and an SDHC slot. This means that debian (or another debian based OS such as Ubuntu) can be installed either to the internal flash or to one of the external storage media available.  Newit ship the plugs in various configurations and will happily sell you a device fully prepared with debian (either Lenny or Squeeze according to your taste) on SD card to go with the standard Ubuntu 9.04 in flash. Personally I chose to install debian myself, so I bought the base model. (No, I&#8217;m not a cheapskate, I just prefer to play. Where&#8217;s the fun in buying stuff that &#8220;just works&#8221;?) </p>
<p>Given that Martin&#8217;s instructions suggest that installing to USB disk can be problematic, and that I have debian lenny on my slugs (and had a spare 4 Gig SDHC card lying around)  I chose to use his tarball to install lenny to my SDHC card. Firstly I formatted the card (via a a USB mounted card reader) as  below:</p>
<blockquote><p>/dev/sdb1 512 Meg bootable<br />
/dev/sdb2 2.25 Gig<br />
/dev/sdb3 1024 Meg swap</p></blockquote>
<p>(note that the plug will see these devices as &#8220;/dev/mmcblk0pX&#8221; when the card is loaded. The &#8220;/dev/sdbX&#8221; layout simply reflects the fact that I was using a USB mounted card reader on my PC. )</p>
<p>I then downloaded and installed Martin&#8217;s lenny tarball to the newly formatted card and as instructed edited the /etc/fstab to match my installation. Martin&#8217;s fstab file is below:</p>
<blockquote><p># /etc/fstab: static file system information.<br />
#<br />
# <file system> <mount point>   <type><br />
<options>       <dump>
<pass>
proc            /proc           proc    defaults        0       0<br />
# Boot from USB:<br />
/dev/sda2       /               ext2    errors=remount-ro 0       1<br />
/dev/sda1       /boot           ext2    defaults        0       1<br />
/dev/sda3       none            swap    sw              0       0<br />
# Boot from SD/MMC:<br />
#/dev/mmcblk0p2       /         ext2    errors=remount-ro 0       1<br />
#/dev/mmcblk0p1       boot      ext2    defaults        0       1<br />
#/dev/mmcblk0p3       none      swap    sw              0       0</p></blockquote>
<p>As you can see it defaults to assuming a USB attached device. You need to comment out the USB boot entries and uncomment the SD/MMC entries if. like me, you are intending to boot from SD card. At this stage I also edited &#8220;/etc/network/interfaces&#8221; to change the eth0 interface from dhcp to static (to suit my network) and I changed &#8220;/etc/resolv.conf&#8221; because the default includes references to cyrius.com and a local IP address for DNS.</p>
<p>Before we can boot from the SD card, we have to make a few changes to the uboot boot loader configuration to stop it using the default OS on internal flash (where the factory installed Ubuntu resides). Again, Martin&#8217;s instructions are helpful here but he points to the <a href="http://www.openplug.org/plugwiki/index.php/Setting_up_Serial_Console_Under_Linux">openplug.org wiki</a> for instructions in setting up the necessary serial connection to the plug. On my PC (running Ubuntu 8.04 LTS) I got no ttyUSB devices by default and &#8220;modprobe usbserial&#8221; did not work but &#8220;<strong>modprobe ftdi_sio vendor=0x9e88 product=0x9e8f</strong>&#8221; did work for me.</p>
<p>Now open a TTY session using cu thusly &#8220;<strong>cu -s 115200 -l /dev/ttyUSB1</strong>&#8221; &#8211; don&#8217;t use putty on linux, it doesn&#8217;t allow cut and paste which can be very useful if you are following on-line instructions (of course it helps if you cut and paste the <strong>right</strong> instructions). I found that booting is too fast if you have to switch on the plug and then return to a keyboard so I recommend simply leaving the terminal session open and resetting the plug with a pin or paper clip. Hit any key to interrupt the boot session, then follow Martin&#8217;s instructions for editing the uboot environment.</p>
<p>My plug was running v 3.4.16 of uboot, so at first I used version 3.4.27 (downloaded from <a href="http://plugcomputer.org/plugforum/index.php?PHPSESSID=20f99cd93e9f29e51b82d585426b841c&#038;topic=1134.0">plugcomputer.org</a>) and loaded that via tftp as described by Martin, But this turmed out to be a mistake because my plug failed to boot thereafter. I got the following error message via the serial console:</p>
<blockquote><p>## Booting image at 00400000 &#8230;<br />
   Image Name:   Debian kernel<br />
   Created:      2009-11-23  17:25:02 UTC<br />
   Image Type:   ARM Linux Kernel Image (uncompressed)<br />
   Data Size:    1820320 Bytes =  1.7 MB<br />
   Load Address: 00008000<br />
   Entry Point:  00008000<br />
   Verifying Checksum &#8230; Bad Data CRC
</p></blockquote>
<p>Some searching suggested that the uboot image was probably the problem and that reverting to v3.4.19 would solve this. So I downloaded 3.4.19 from &#8220;vioan&#8217;s&#8221; <a href="http://plugcomputer.org/plugforum/index.php?PHPSESSID=c8e73c40cac9d0f1301ff24cb5803a45&#038;topic=968.0">post &#8220;#6 on: November 16, 2009, 03:21:34 PM&#8221; </a> at the plugcomputer.org forum and reflashed the plug with that image. Success &#8211; my plug now booted into debian lenny. Tidy up, update the OS and add a normal user as recommended and we&#8217;re ready to go. </p>
<p>My plug was intended to replace the slug I was using as my local apt-mirror. That mirror is now fairly large because I have a mix of 32 and 64 bit ubuntus (of varying vintages) and 386 and ARM versions of debian. I therefore recycled an unused 500 gig lacie USB disk and mounted that as /home2 (originally as /home, but I soon changed that when I wanted to unmount it frequently and then lost my home directory&#8230;.)  Copying the apt-mirror (175 Gig) over the network from my old slug was clearly going to take forever &#8211; high speed networking is not the slug&#8217;s forte, so I mounted both the slug and the plug&#8217;s disks locally on my PC and copied the files over USB &#8211; much faster. It was here that I discovered why the old lacie disk (a &#8220;designed by porsche&#8221; aluminium coated beast) was lying idle. I&#8217;d forgotten that it sounded like a harrier jump jet on take off when in use. I put up with that for a week &#8211; just long enough to get me to a free weekend when I could rebuild the old slug (now used as just an NTP server and the <a href="http://webcam.baldric.net/">webcam</a>) to boot from a 4 gig USB stick so that I could recycle its disk onto the plug. I&#8217;ve just finished doing that.</p>
<p>One other problem I found with the plug which caused me much head scratching (and delayed my writing this as I noted above) was that it consistently failed to boot back into my debian install after a &#8220;reboot&#8221; or &#8220;shutdown -r&#8221; &#8211; I had to power cycle the device to get it to boot properly. I spent some time this weekend with the serial port connected before I noticed (using &#8220;printenv&#8221; at the uboot prompt) that I had mixed up the uboot environment variables printed on Martin&#8217;s site. I had actually copied part of the instructions for the USB boot variant instead of the correct ones for the SD card boot. Sometimes &#8220;cut and paste&#8221; can be a mistake.</p>
]]></content:encoded>
			<wfw:commentRss>http://baldric.net/2010/02/28/from-slug-to-plug/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>system monitoring with munin</title>
		<link>http://baldric.net/2009/11/15/system-monitoring-with-munin/</link>
		<comments>http://baldric.net/2009/11/15/system-monitoring-with-munin/#comments</comments>
		<pubDate>Sun, 15 Nov 2009 18:22:07 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[linux and unix]]></category>
		<category><![CDATA[networks and networking]]></category>
		<category><![CDATA[tips, tricks and howtos]]></category>
		<category><![CDATA[trivial musing]]></category>

		<guid isPermaLink="false">http://baldric.net/?p=364</guid>
		<description><![CDATA[A while back a friend and colleague of mine introduced me to the server monitoring tool called munin which he had installed on one of the servers he maintains. It looked interesting enough for me to stick it on my &#8220;to do&#8221; list for my VPSs. Having a bunch of relevant stats presented in graphical [...]]]></description>
			<content:encoded><![CDATA[<p>A while back a friend and colleague of mine introduced me to the server monitoring tool called <a href="http://munin.projects.linpro.no/">munin</a> which he had installed on one of the servers he maintains. It looked interesting enough for me to stick it on my &#8220;to do&#8221; list for my VPSs. Having a bunch of relevant stats presented in <a href="http://munin.ping.uio.no/ping.uio.no/bimbo.ping.uio.no.html">graphical form</a> all in one place would be useful. So this weekend I decided to install it on both my mail and web VPS and my tor node.</p>
<p>Munin can be installed in a master/slave configuration where one server acts as the main monitoring station and periodically polls the others for updated stats. This is the setup I chose, and now this server (my web and mail host) acts as the master and my <a href="http://toroftheworld.aibohphobia.org/">tor node</a> is a slave. Each server in the cluster must be set to run the munin-node monitor (which listens by default on port 4949) to allow munin itself to connect and gather stats for display. The configuration file allows you to restrict connections to specific IP addresses. On the main node I limit this to local loopback whilst on the tor node I allow the master to connect in addition to local loopback. And just to be on the safe side, I reinforced this policy in my iptables rules.</p>
<p>The graphs are drawn using <a href="http://oss.oetiker.ch/rrdtool/">RRDtool</a>, which can be a little heavy on CPU usage, certainly too heavy for the slugs which ruled out my installing the master locally rather than on one of the VPSs. But the impact on my bytemark host looks perfectly acceptable so far.</p>
<p>One of the neatest things about munin is its open architecture. Statistics are all collected via a series of plugins. These plugins can be written in practically any scripting language you care to name.  In the plugins which came by default with the standard debian install of munin I found plugins mostly written as shell scripts with the occasional perl script. However, a couple of the additional scripts I installed were written in php and python. The standard set of plugins covers most of what you would expect to monitor on a linux server (cpu, memory i/o, process stats, mail traffic etc). but there were two omissions which were quite important to me. One was for lighttpd, the other for tor. I found suitable candidates on-line pretty quickly though. The tor monitor plugin can be found on the <a href="http://muninexchange.projects.linpro.no/">munin exchange</a> site (a repository of third party plugins). I couldn&#8217;t find a lighttpd plugin there but eventually picked one up from <a href="http://thomasfischer.biz/posts/custom-munin-plugins-the-easy-way-or-python-rocks-perl-sucks">here</a> (thomas is clearly not a perl fan).</p>
<p>Most plugins (at least those supplied by default in the the debian package) &#8220;just work&#8221;, but some do need a little extra customisation. For example the &#8220;ip_ &#8221; plugin (which monitors network traffic on specified IP addresses) gets its stats from iptables and assumes that you have an entry of the form:</p>
<blockquote><p>-A INPUT -d 192.168.1.1<br />
-A OUTPUT -s 192.168.1.1
</p></blockquote>
<p>at the top of your iptables config file. You also need to ensure that the &#8220;ip_&#8221; plugin is correctly named with the suffix formed of the IP address to be monitored (e.g. &#8220;ip_&#8221; becomes &#8220;ip_192.168.1.1&#8243;). The simplest way to do this (and certainly the best way if you wish to monitor multiple addrresses) is to ensure that the symlink from &#8220;/etc/munin/plugins/ip_&#8221; to &#8220;/usr/share/munin/plugins/ip_&#8221; is named correctly. Thus (in directory /etc/munin/plugins):</p>
<blockquote><p>ln -s /usr/share/munin/plugins/ip_  ip_192.168.1.1
</p></blockquote>
<p>The lighttpd plugin I found also needs a little bit of work before you can see any useful stats. The plugin connects to lighty&#8217;s &#8220;server status&#8221; URL to gather its information. So you need to ensure that you have loaded the mod_status module in your lighty config file and you have specified the URL correctly (any name will do, it just has to be connsistent in both the lighty config and the plugin). It is also worth restricting access to  the URL to local loopback if you are not going to access the stats directly from a browser from elsewhere. This sort of entry in your config file should do:</p>
<blockquote><p>server.modules += ( &#8220;mod_status&#8221; )</p>
<p>$HTTP["remoteip"] == &#8220;127.0.0.1&#8243; {<br />
       status.status-url = &#8220;/server-status&#8221;<br />
       }
</p></blockquote>
<p>The tor plugin connects to the tor control port (9051 by default) but this port is normally not configured because it poses a security risk if configured incorrectly. Unless you also specify one of &#8220;HashedControlPassword&#8221; or &#8220;CookieAuthentication&#8221;, in the tor config file, then setting this option will cause tor to allow <strong>any</strong> process on the local host to control it. This is a &#8220;bad thing&#8221; (TM). If you choose to use the tor plugin, then you should ensure that access to the control port is locked down. The tor plugin assumes that you will use &#8220;CookieAuthentication&#8221;, but the path to the cookie is set incorrectly for the standard debian install (which sets the tor data directory to /var/lib/tor rather than the standard /etc/tor). </p>
<p>So far it all looks good, but I may add further plugins (or remove less useful ones) as I experiment with munin over the next few weeks.</p>
]]></content:encoded>
			<wfw:commentRss>http://baldric.net/2009/11/15/system-monitoring-with-munin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>debian on a DNS-313</title>
		<link>http://baldric.net/2009/10/03/debian-on-a-dns-313/</link>
		<comments>http://baldric.net/2009/10/03/debian-on-a-dns-313/#comments</comments>
		<pubDate>Sat, 03 Oct 2009 20:38:26 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[linux and unix]]></category>
		<category><![CDATA[networks and networking]]></category>
		<category><![CDATA[tips, tricks and howtos]]></category>
		<category><![CDATA[trivial musing]]></category>

		<guid isPermaLink="false">http://baldric.net/?p=301</guid>
		<description><![CDATA[I bought another new toy last week &#8211; a D-Link DNS 313 NAS. Actually, this was a mistake because what I really wanted was the DNS-323. I just wasn&#8217;t careful enough at the time. Quite apart from having space for two 3.5&#8243; SATA hard drives instead of just one, the 323 is a very different [...]]]></description>
			<content:encoded><![CDATA[<p>I bought another new toy last week &#8211; a <a href="http://www.dlink.co.uk/cs/Satellite?c=Product_C&#038;childpagename=DLinkEurope-GB%2FDLProductCarousel&#038;cid=1197319418492&#038;packedargs=locale%3D1195806691854&#038;pagename=DLinkEurope-GB%2FDLWrapper">D-Link DNS 313</a> NAS.</p>
<div id="attachment_302" class="wp-caption aligncenter" style="width: 310px"><a href="http://baldric.net/wp-content/uploads/2009/10/DNS-313_L.jpg"><img src="http://baldric.net/wp-content/uploads/2009/10/DNS-313_L.jpg" alt="D-Link DNS-313" title="DNS-313" width="300" height="200" class="size-full wp-image-302" /></a><p class="wp-caption-text">D-Link DNS-313</p></div>
<p>Actually, this was a mistake because what I really wanted was the <a href="http://wiki.dns323.info/">DNS-323</a>. I just wasn&#8217;t careful enough at the time. Quite apart from having space for two 3.5&#8243; SATA hard drives instead of just one, the 323 is a very different beast to its smaller (and much cheaper) sibling. </p>
<p>Martin Michlmayr has a nice <a href="http://www.cyrius.com/debian/orion/d-link/dns-323/">guide</a> to installing debian on a 323. Given that the 323 has a faster processor and more RAM than a slug and it can take two internal SATA disks rather than just the external USBs  it looks like an attractive option for a new debian based server. Pity then that I bought the wrong one. My excuse is that I thought the only difference was in the disk capacity and I was prepared to settle for just 1TB of store. The (normally reliable) owner of the shop where I bought the beast was also adamant that the disk capacity was the only difference between the two devices.  I should have known better than to succumb to what was essentially an impulse buy when I wasn&#8217;t really intending to buy a new NAS at the time (I was in the shop for something else and picked up the 313 because I recalled reading Martin&#8217;s pages recently).</p>
<p>Once I got the 313 home of course and checked the specs it looked as if I would be stuck with the D-Link supplied OS. However, a bit of searching turned up the <a href="http://forum.dsmg600.info/">DSM-G600, DNS-323 and TS-I300 Hack Forum</a> which has a series of articles on installing debian on a 313 (despite the forum title). A forum contributor called &#8220;CharminBaer&#8221; has put together a nice tarball of debian lenny which allows the user to replace the D-Link OS without actually reflashing the device. This means that the original bootloader is retained but the device boots into the replacement system on disk. The nicest part of this installation method is that there is almost no risk of bricking the device because the installation simply entails copying the tarball onto the disk over a USB connection, extracting the files and then booting into a shiny new Lenny install. Result.</p>
<p>The tarball can be found <a href=" http://www.msbd.de/dns313/DNS-313_lenny_24092008.tgz">here</a>, and the installation instructions are <a href=" http://www.msbd.de/dns313/Install_lenny_en.rtf">here</a>.  </p>
<p>Many thanks to &#8220;CharminBaer&#8221;.</p>
]]></content:encoded>
			<wfw:commentRss>http://baldric.net/2009/10/03/debian-on-a-dns-313/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>wordpress on lighttpd</title>
		<link>http://baldric.net/2009/09/12/wordpress-on-lighttpd/</link>
		<comments>http://baldric.net/2009/09/12/wordpress-on-lighttpd/#comments</comments>
		<pubDate>Sat, 12 Sep 2009 20:50:46 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[linux and unix]]></category>
		<category><![CDATA[networks and networking]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[tips, tricks and howtos]]></category>
		<category><![CDATA[trivial musing]]></category>

		<guid isPermaLink="false">http://baldric.net/?p=239</guid>
		<description><![CDATA[I have commented in the past how I prefer lighttpd to apache, particularly on low powered machines such as the slug. I used to be a big apache fan, in fact I think I first used it at version 1.3.0 or maybe 1.3.1, having migrated from NCSA 1.5.1 (and before that Cern 3.0) back in [...]]]></description>
			<content:encoded><![CDATA[<p>I have commented in the past how I prefer <a href="http://www.lighttpd.net/">lighttpd</a> to <a href="http://www.apache.org/">apache</a>, particularly on low powered machines such as the <a href="http://baldric.net/2008/04/07/slugs-as-pets/">slug</a>. I used to be a big apache fan, in fact I think I first used it at version 1.3.0 or maybe 1.3.1, having migrated from NCSA 1.5.1 (and before that Cern 3.0) back in the day when I ran web servers for a living. However, those days are long gone and my web server requirements are now limited to my home network and VPSs so I don&#8217;t need, nor do I want, the power of an industrial strength apache installation. In fact, my primary home web server platform (the slugs) struggles with a standard apache install. Lighttpd works very well on machines which are low on memory.</p>
<p>Having got used to lighttpd, it seemed a natural platform to use on my VPSs. And it performs very well on those machines for the kind of traffic I see. Moving trivia to my bytemark VPS meant that I had to take care of some minor configuration issues myself &#8211; most notably the form of permalinks I use. Most of the documentation about running your own wordpress blog assumes that you will be using apache (since that is the most popular web server software provided by shell account providers). For those of you who, like me, want to use lighttp instead, the configuration details from my vhosts config file are below. Lighttpd is remarkably easy to configure for both virtual hosting in general, and for wordpress in particular. Note that I also choose to restrict access to wp-admin to my home IP address, this helps to keep the bad guys out.</p>
<p><strong>Extract of &#8220;conf-enabled/10-simple-vhost.conf&#8221; file:</strong></p>
<blockquote><p># redirect www. to domain (assumes that &#8220;mod_redirect&#8221; is set in server.modules in lighttpd.conf)</p>
<p>$HTTP["host"] =~ &#8220;www.baldric.net&#8221; {<br />
url.redirect = ( &#8220;.*&#8221; =&gt; &#8220;http://baldric.net&#8221;)<br />
}</p>
<p>#<br />
# config for the blog<br />
#<br />
$HTTP["host"] == &#8220;baldric.net&#8221; {<br />
# turn off dir listing (you can do this globally of course, but I choose not to.)<br />
server.dir-listing      = &#8220;disable&#8221;<br />
#<br />
# do the rewrite for permalinks (it really is that simple)<br />
#<br />
server.error-handler-404 = &#8220;/index.php&#8221;<br />
#<br />
# reserve accesss to wp-admin directory and wp-login to our ip address<br />
#<br />
$HTTP["remoteip"] !~ &#8220;123.123.123.123&#8243; {<br />
$HTTP["url"] =~ &#8220;^/wp-admin/&#8221; {<br />
url.access-deny =(&#8220;&#8221;)<br />
}<br />
$HTTP["url"] =~ &#8220;^/wp-login.php&#8221; {<br />
url.access-deny =(&#8220;&#8221;)<br />
}<br />
}</p>
<p>}</p>
<p># end</p></blockquote>
<p>Enjoy.</p>
]]></content:encoded>
			<wfw:commentRss>http://baldric.net/2009/09/12/wordpress-on-lighttpd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>z05</title>
		<link>http://baldric.net/2009/08/02/z05/</link>
		<comments>http://baldric.net/2009/08/02/z05/#comments</comments>
		<pubDate>Sun, 02 Aug 2009 20:51:43 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[linux and unix]]></category>
		<category><![CDATA[networks and networking]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[trivial musing]]></category>

		<guid isPermaLink="false">http://baldric.net/2009/08/02/z05/</guid>
		<description><![CDATA[I really missed the old phrack magazine. Some of the &#8220;loopback&#8221; entries in particular are superb examples of technical nous, complete irreverance and deadpan humour. One of my favourites (from phrack 55) appears in my blogroll under &#8220;network (in)security&#8221;. I am particularly fond of the observation that details of how to exploit old vulnerabilities are [...]]]></description>
			<content:encoded><![CDATA[<p>I really missed the old <a href="http://www.phrack.org/">phrack</a> magazine. Some of the &#8220;loopback&#8221; entries in particular are superb examples of technical nous, complete irreverance  and deadpan humour. One of my favourites (from <a href="http://www.phrack.org/archives/55/p55_0x02_Phrack%20Loopback_by_Phrack%20Staff.txt">phrack 55</a>) appears in my blogroll under &#8220;network (in)security&#8221;. I am particularly fond of the observation that details of how to exploit old vulnerabilities are &#8220;[ As useless as 1950's porn. ] &#8220;. As I said, sorely missed (but now, with<a href="http://www.phrack.org/issues.html?issue=66&#038;id=1#article"> issue 66</a> back in action after over a year since the last release).</p>
<p>It would seem, however, that I have been missing a new kid on the block who follows in phrack&#8217;s footsteps. A group called z0 appears to publish a &#8216;zine in the mold of the phrack of old. And their latest release, <a href="http://sucuri.net/mirror/zf05.txt">z05.txt</a> has been causing something of a stir because it relates details of the compromise of systems owned and/or managed by some high profile and well known personages such as Dan Kaminsky and Kevin Mitnick.</p>
<p>The &#8216;zine bears reading. The style is unmistakably &#8220;underground&#8221; and &#8220;down with the kids&#8221; and it is (unnecessarily in my view) filled with unix-geek listings of bash history files and such like, but its authors still manage to make the sort of pertinent comments that I so loved in phrack.</p>
<blockquote><p>&#8220;It&#8217;s the simple stuff that works now, and will continue to work years into the future. Not only is it way easier to dev for simple mistakes, but they are easier to find and are more plentiful.&#8221;</p></blockquote>
<p>How well patched are you?</p>
]]></content:encoded>
			<wfw:commentRss>http://baldric.net/2009/08/02/z05/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>dns failure &#8211; a cautionary tale</title>
		<link>http://baldric.net/2009/08/02/dns-failure-a-cautionary-tale/</link>
		<comments>http://baldric.net/2009/08/02/dns-failure-a-cautionary-tale/#comments</comments>
		<pubDate>Sun, 02 Aug 2009 18:51:11 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[networks and networking]]></category>
		<category><![CDATA[trivial musing]]></category>

		<guid isPermaLink="false">http://baldric.net/2009/08/02/dns-failure-a-cautionary-tale/</guid>
		<description><![CDATA[I recently moved one of my domains between two registrars. It seemed like a good idea at the time, but on reflection it was both foolish and unnecessary. Unnecessary because my main requirement for moving it (greater control of my DNS records for that domain) could have been met simply by my redelegating the NS [...]]]></description>
			<content:encoded><![CDATA[<p>I recently moved one of my domains between two registrars. It seemed like a good idea at the time, but on reflection it was both foolish and unnecessary. Unnecessary because my main requirement for moving it (greater control of my DNS records for that domain) could have been met simply by my redelegating the NS records from my old registrar&#8217;s servers to the namesersvers run by my new provider; foolish because it lost me control over, and usage of, that domain for eleven (yes eleven) days. This particular domain happens to host the mailserver (and MX record) for a bunch of my other domains. So the loss of that domain meant that I also lost email functionality on a bunch of other domains as well as the primary domain in question. Not good. Had I been running a business webserver on that domain, or been completely reliant on the mail from that smtp host I could have been in deep trouble. As it was, I was simply hugely inconvenienced (neither of my two main domains were affected because I kept the mail for those domains pointed at a different mailserver).</p>
<p>So what happened?</p>
<p>My new provider offers greater granularity of control over DNS records than my main registrar. Moving my DNS to them would give me complete control rather than being limited to creation of a restricted number of subdomains and new MX records. I like control. What I didn&#8217;t think through carefully enough was whether I (a) really needed that additional control and (b) really needed to actually change registrar to gain that control.  As it turns out, the answer to both those questions is no &#8211; but hey, we all make mistakes.</p>
<p>Anyway, having convinced myself that I actually <strong>did</strong> need to move my domain to the new registrar, the following series of events lost me the domain for those eleven days.</p>
<p>Firstly I tried to use my new registrar&#8217;s control panel to inititate the transfer. This failed  &#8211; for some technical reason which the registrar identified and fixed later. This alone should have forewarned me of impending difficulty, but no, I pressed ahead when the tech support team offered to initiate the transfer manually. I accepted,</p>
<p>Secondly, I created the necessary new DNS records on the new registrar&#8217;s DNS servers ready for the transfer. Naively, I believed that once the old registrar surrendered control, my new reigistrar&#8217;s servers would be shown as authoritative and I would have control. I also believed (again naively and incorrectly as it happens) that my old registrar would maintain its view of my domain until the delegation had switched.</p>
<p>Thirdly, I used my old registrar&#8217;s control panel to initiate cancellation of registration at their end and transfer to my new registrar. This is where things started to go seriously wrong.  As soon as my old registrar had confirmed cancellation at their end, they effectively switched off the DNS for that domain. Presumably this is because they were  no longer contractually responsible for its maintenance. But the whois records continued to show that their nameservers were authoritative for my domain for the next six days whilst the transfer was taking place. I confess to being completely bemused as to why it should take so long for this to happen, but I put that in the same category of mystery as to what happens to my money in the time I transfer sums electronically between two bank accounts &#8211; slow electrons I guess.</p>
<p>So now the old registrar is shown as authoritative but doesn&#8217;t answer. The new registrar has the correct records but can&#8217;t answer because it is not authoritative.</p>
<p>Eventually my new registrar is shown in the whois record as the correct sponsor, but the NS records of my old registrar are still shown as authoritative. Here it gets worse. The control panel for my new registrar is still broken and I have no way of changing  the NS records to point to the correct servers. So I email support. And email support. And email support. Eventually I get a (deeply apologetic) response from support which says that they were so busy fixing the problem highlighted by the failure uncovered in their automatic process that they &#8220;forgot&#8221; to keep me (the customer) informed.</p>
<p>Now, whilst neither company concerned covered themselves in glory during this process, on reflection I am reluctant to beat them up too much because I have come to the conclusion that, technical failure aside, much of the trouble could have been avoided if I had thought carefully about what it was I was trying to achieve, and had read and carefully considered the documentation on both company&#8217;s sites before starting the transfer. Documentation about registrant transfer is fairly clear in its warning that the process can take about five or six days. It is also not unreasonable that a company losing contracted responsibility for DNS maintenance should cease to answer queries about that domain (after all, they could be wrong&#8230;) OK &#8211; the new registrar failed big time in its customer care, but they did apologise profusely and (so far) they haven&#8217;t actually charged me anything for the transfer.</p>
<p>What I <strong>should</strong> have done before starting the transfer was to redelegate authority for the domain from the old registrar&#8217;s nameservers to my new registrar&#8217;s servers. That way I would not have had the long break in service. In fact, if I had thought about it carefully, I could have simply left it at that and not started the transfer of registrar at all. After all, once authority was redelegated, I would have complete control on my new servers.</p>
<p>Lesson? Once again, read the documentation. And think. I really ought to know better at my age.</p>
]]></content:encoded>
			<wfw:commentRss>http://baldric.net/2009/08/02/dns-failure-a-cautionary-tale/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
