<?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>nick.recoil.org &#187; Sysadmin</title>
	<atom:link href="http://nick.recoil.org/category/sysadmin/feed/" rel="self" type="application/rss+xml" />
	<link>http://nick.recoil.org</link>
	<description>Connector in, receiver out</description>
	<lastBuildDate>Tue, 28 Jul 2009 21:39:23 +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>Low-power embedded hardware</title>
		<link>http://nick.recoil.org/2008/05/low-power-embedded-hardware/</link>
		<comments>http://nick.recoil.org/2008/05/low-power-embedded-hardware/#comments</comments>
		<pubDate>Sun, 18 May 2008 11:29:00 +0000</pubDate>
		<dc:creator>nick</dc:creator>
				<category><![CDATA[DVB]]></category>
		<category><![CDATA[Sysadmin]]></category>
		<category><![CDATA[embedded]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[pico-itx]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[A chap at Smoke and Mirrors, where I’m doing some Freelance work, is creating a system to bridge between video routers and a web-based status page. Most of the suites within the building are plumbed in via fibre-optic KVM connections, and depending on the schedule, different video processing systems can get presented in different rooms [...]]]></description>
			<content:encoded><![CDATA[<p>A chap at <a href="http://www.smoke-mirrors.co.uk/">Smoke and Mirrors</a>, where I’m doing some Freelance work, is creating a system to bridge between <a href="http://en.wikipedia.org/wiki/Video_router">video routers</a> and a web-based status page. Most of the suites within the building are plumbed in via fibre-optic <span class="caps">KVM</span> connections, and depending on the schedule, different video processing systems can get presented in different rooms at different times. All it takes is a change on the routers.</p>
<p>Although complex, this enables the most cost-effective use of each system, marrying the functionality needed to the number of physical people required to attend the session for any given day. There is a large variation in price and functionality with certain high-end systems, so you always want to try and get maximal use from the systems you have chosen to invest in.</p>
<p>He’s looking at using one of the boards from the wonderfully named <a href="http://www.acmesystems.it/">Acme Systems</a> from Rome. The idea is to communicate with the video router via its RS-232 serial interface, and retrieve an <span class="caps">ASCII</span> representation of the current router configuration. It’s a fascinating area of software <strong><span class="caps">AND</span></strong> hardware as glue. A physical device which will run some bespoke code to bridge information from one system into another.</p>
<p><img class="alignnone size-full wp-image-58" title="pico-itx_board" src="http://localhost/~nick/wordpress/wp-content/uploads/2009/03/pico-itx_board.jpg" alt="pico-itx_board" width="400" height="330" /></p>
<p>In related news, I’ve also received my <a href="http://www.via.com.tw/en/products/embedded/artigo/">Artigo Pico-ITX kit</a> and am now a proud owner of the tiniest system running Linux that I’ve ever seen. It also seems to play happily with the <span class="caps">DVB</span> sticks that I had stability issues with on the older Mini-ITX M10k board.</p>
<p>The fan is noticable in a very quiet room, but as soon as there’s anything else to be heard, it’s drowned out, so it’s not quite suitable for your bedroom. They do a fanless system, but it’s half the clock speed. Installing it was done over <span class="caps">PXE</span> from my Mac, using the <a href="http://archive.ubuntu.com/ubuntu/dists/hardy/main/installer-i386/current/images/netboot/">Ubuntu netboot downloads</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://nick.recoil.org/2008/05/low-power-embedded-hardware/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AppleTV &amp; Ubuntu hacking</title>
		<link>http://nick.recoil.org/2008/05/appletv-ubuntu-hacking/</link>
		<comments>http://nick.recoil.org/2008/05/appletv-ubuntu-hacking/#comments</comments>
		<pubDate>Mon, 05 May 2008 23:04:00 +0000</pubDate>
		<dc:creator>nick</dc:creator>
				<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[Sysadmin]]></category>
		<category><![CDATA[Television]]></category>
		<category><![CDATA[appletv]]></category>
		<category><![CDATA[g-202]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[perian]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[I’ve finally enabled SSH on my long dormant AppleTV, and am integrating it into my DVB / Rails / Beanstalk / MySQL system for processing data. I’ve used the Patchstick image available from atv4windows. I ended up unpacking and dd’ing the image from the Mac, but the process remains exactly the same. I now have [...]]]></description>
			<content:encoded><![CDATA[<p>I’ve finally enabled <span class="caps">SSH</span> on my long dormant AppleTV, and am integrating it into my <span class="caps">DVB</span> / Rails / Beanstalk / MySQL system for processing data. I’ve used the Patchstick image available from <a href="http://www.wiki.atv4windows.com/">atv4windows</a>. I ended up unpacking and dd’ing the image from the Mac, but the process remains exactly the same. I now have Perian, ssh and a slew of other things enabled, and all I need now is to attempt the hack to get composite output working. I’ve yet to take the plunge and replace my old <span class="caps">CRT</span> with an <span class="caps">LCD TV</span>.</p>
<p>Incidentally, for anyone looking to figure out the ssh username and password for your freshly enabled ssh daemon, they are both <strong>frontrow</strong>, and that user has <strong>passwordless sudo privileges</strong>.</p>
<p>I also had a minor breakthrough with my x86_64 Ubuntu 8.04 machine. I have a Zyxel G-202 Wireless <span class="caps">USB</span> stick, to keep the number of trailing wires to a minimum, but I kept getting an error saying:</p>
<table class="CodeRay">
<tr>
<td title="click to toggle" class="line_numbers">
<pre>1<tt>
</tt></pre>
</td>
<td class="code">
<pre>zd1211rw error ioread32(CF_REG1): -110<tt>
</tt></pre>
</td>
</tr>
</table>
<p>Which was exceedingly unhelpful. I eventually tried disabling hi-speed <span class="caps">USB</span> from the <span class="caps">BIOS</span>, and rebooted to find it sprang into life immediately. Great! What was even more strange that when I rebooted and reset the <span class="caps">BIOS</span> back to enable <span class="caps">USB 2</span>.0, the G-202 kept working.  I’m unsure whether this is due to the device not being cold booted, and I’ve yet to see if it stops working after I power the system off, but so far so good, and I don’t need to resort to <span class="caps">NDIS</span>.</p>
]]></content:encoded>
			<wfw:commentRss>http://nick.recoil.org/2008/05/appletv-ubuntu-hacking/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Saving my blown Seagate Barracuda 7200.10 hard drive</title>
		<link>http://nick.recoil.org/2008/03/saving-my-blown-seagate-barracuda-720010-hard-drive/</link>
		<comments>http://nick.recoil.org/2008/03/saving-my-blown-seagate-barracuda-720010-hard-drive/#comments</comments>
		<pubDate>Fri, 21 Mar 2008 13:59:00 +0000</pubDate>
		<dc:creator>nick</dc:creator>
				<category><![CDATA[Sysadmin]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[Whilst messing around with my Mini ITX box, I managed to touch the power connector onto the drive backwards, blowing one of the components near the connector. I noticed that the controller board is screwed on with standard torx screws, so I took them out, curious about the connector to the main chassis. After removing [...]]]></description>
			<content:encoded><![CDATA[<p>Whilst messing around with my Mini <span class="caps">ITX</span> box, I managed to touch the power connector onto the drive backwards, blowing one of the components near the connector. I noticed that the controller board is screwed on with standard torx screws, so I took them out, curious about the connector to the main chassis.</p>
<p>After removing them, the board came away easily, and uses pressure pads as a connection mechanism, rather than ribbon cable or other methods. This set me wondering about whether this would be a replaceable part. I contacted Seagate, who told me that they don’t supply them separately. I then wondered about getting an identical drive, and replacing the old board with one from the new drive, so I went ahead and ordered a replacement; I’d need it anyway, even if this attempt at data recovery failed.</p>
<p>After it arrived, and I’d done the swap, I turned on the machine, and back came my drive with all my data on it, safe and sound. I did worry about whether the <span class="caps">IDE</span> controller boards carry some kind of mapping table that’s specific to a particular set of platters, but this isn’t the case, it seems. Unfortunately I’ve no way of repairing the original blown board. Replacing surface mount components is tricky.</p>
<p>For anybody wondering, you can replace the controller board for a Seagate Barracuda 7200.10 500GB drive with no ill effects.</p>
]]></content:encoded>
			<wfw:commentRss>http://nick.recoil.org/2008/03/saving-my-blown-seagate-barracuda-720010-hard-drive/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Loopback NAT with pf</title>
		<link>http://nick.recoil.org/2006/07/loopback-nat-with-pf/</link>
		<comments>http://nick.recoil.org/2006/07/loopback-nat-with-pf/#comments</comments>
		<pubDate>Tue, 25 Jul 2006 00:40:00 +0000</pubDate>
		<dc:creator>nick</dc:creator>
				<category><![CDATA[Sysadmin]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[A useful trick with hosting servers via ADSL connections at home is to provide something called NAT loopback. In this text, I will be giving an example setup using OpenBSD’s pf tool. Imagine the following: You have a development server hosted via an ADSL line, behind a NAT router/firewall. You would like this development server [...]]]></description>
			<content:encoded><![CDATA[<p>A useful trick with hosting servers via <span class="caps">ADSL</span> connections at home is to provide something called <strong><span class="caps">NAT</span> loopback</strong>. In this text, I will be giving an example setup using <a href="http://www.openbsd.org/">OpenBSD</a>’s <a href="http://www.openbsd.org/faq/pf/">pf</a> tool. Imagine the following:</p>
<p>You have a development server hosted via an <span class="caps">ADSL</span> line, behind a <span class="caps">NAT</span> router/firewall. You would like this development server to be visible to others via the Internet, and you have assigned a name in <span class="caps">DNS</span> which maps to one of the externally visible IP addressed assigned to you via your <span class="caps">ADSL</span> hosting company. You then set up a virtual host on the development webserver so that it responds to the <span class="caps">DNS</span> name you’ve assigned it.</p>
<div><img class="alignnone size-full wp-image-59" title="loopback_nat" src="http://localhost/~nick/wordpress/wp-content/uploads/2009/03/loopback_nat.png" alt="loopback_nat" width="400" height="538" /></div>
<p>A problem arises when you need to talk to the machine locally on your network, using the <span class="caps">DNS</span> name you’ve given it. Without any special rules, this will not work due to the following series of events:</p>
<ol>
<li>You generate a request to your webserver’s external IP address, which is bound to your <span class="caps">NAT</span> box’s external interface</li>
<li>Your request hits the <span class="caps">NAT</span> box, and the destination IP is rewritten as the local address, and is forwarded on</li>
<li>The request hits the webserver, but the source address is on the local <span class="caps">LAN</span>. The webserver replies directly to your machine</li>
<li>Your computer receives the reply, but the source IP address is the <strong>local</strong> address, not the <strong>remote</strong> address, so the data is discarded</li>
</ol>
<p>What is required within the pf rules is a redirect that takes traffic bound for the external IP address of the webserver, and rewrites the source address, so the reply gets sent back to the <span class="caps">NAT</span> box, and in turn gets rewritten and redirected back to the originating host.</p>
<pre><code>
 # DEFINES ##########
 # network interfaces
 internal_if = "sip0"
 external_if = "sip1" 

 # NAT box
 gw = "192.0.2.1" 

 # webserver
 www_int_ip = "10.0.0.2"
 www_ext_ip = "192.0.2.2"
 # ports to be redirected
 www_ports_tcp = " {80} " 

 # RULES ##########
 # define our general NAT
 nat on $external_if inet from $internal_if:network to any -&gt; $gw

 # define our external sources to the webserver
 rdr on $external_if inet proto tcp from any to $www_ext_ip
    port $www_ports_tcp -&gt; $www_int_ip

 # for local requests, rewrite the destination as the local
 # IP, rather than the remote one
 rdr on $int_if inet proto tcp from $int_if:network to $www_ext_ip
    port $www_ports_tcp -&gt; $www_int_ip

 # don't NAT other traffic
 no nat on $int_if proto tcp from $int_if
    to $int_if:network

 # keep state on traffic going to the webserver's internal IP address
 nat on $int_if proto tcp from $int_if:network to $www_int_ip
    port $www_ports_tcp -&gt; $int_if
</code></pre>
<p>More information can be found in the <a href="http://www.openbsd.org/faq/pf/rdr.html">pf <span class="caps">FAQ</span></a>. Thanks go to <a href="http://pointless.net/">Jasper Wallace</a> for originally writing the pf rules for the setup in our flat.</p>
]]></content:encoded>
			<wfw:commentRss>http://nick.recoil.org/2006/07/loopback-nat-with-pf/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
