<?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>ipsidixit.net</title>
	<atom:link href="http://www.ipsidixit.net/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ipsidixit.net</link>
	<description>A far off place</description>
	<lastBuildDate>Fri, 06 Apr 2012 08:36:41 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Scouts and discrimination</title>
		<link>http://www.ipsidixit.net/2012/03/30/scouts-and-discrimination/</link>
		<comments>http://www.ipsidixit.net/2012/03/30/scouts-and-discrimination/#comments</comments>
		<pubDate>Fri, 30 Mar 2012 11:46:48 +0000</pubDate>
		<dc:creator>sgroarke</dc:creator>
				<category><![CDATA[FPage]]></category>

		<guid isPermaLink="false">http://www.ipsidixit.net/?p=636</guid>
		<description><![CDATA[<p>Another UK newspaper article about the Scouts today, with yet more nonsense hiding the nature of this discriminatory organisation.</p> <p>Various of the great and good in scouting say, as quoted by The Guardian:</p> <p style="padding-left: 30px;">&#8220;&#8230;scouting is continuing to move with the times and adapt to the growing number of people from different communities who [...]]]></description>
			<content:encoded><![CDATA[<p>Another <a href="http://www.guardian.co.uk/lifeandstyle/2012/mar/30/scouts-outfits-muslim-girls" target="_blank">UK newspaper article</a> about the Scouts today, with yet more nonsense hiding the nature of this discriminatory organisation.</p>
<p>Various of the great and good in scouting say, as quoted by The Guardian:</p>
<p style="padding-left: 30px;"><em><span style="font-size: small;">&#8220;&#8230;scouting is continuing to move with the times and adapt to the growing number of people from different communities who are choosing to be a part of the movement. Scouting has something to offer everyone, no matter your religion, ethnicity or belief, and I&#8217;m so proud that we offer an environment for people of all backgrounds to come together and enjoy themselves.&#8221;</span></em></p>
<p>That is a lie. They do not welcome people of all backgrounds. If you are an atheist, you are not welcome and are prohibited from joining.</p>
<p style="padding-left: 30px;"><em><span style="font-size: small;">It&#8217;s essential to continue to make scouting accessible to all. We welcome all communities and this initiative helps to ensure that no one misses out on the numerous benefits and adventure of scouting&#8230;</span></em></p>
<p>That is a lie. It is not accessible to all. It does not welcome all communities.  If you are an atheist, you are not welcome and are prohibited from joining.</p>
<p style="padding-left: 30px;"><em><span style="font-size: small;">It doesn&#8217;t matter who you are, what you are or what colour your skin is or what faith you are.</span></em></p>
<p>That is a lie. It does matter who you are. You are required to &#8220;have a faith&#8221;.  If you are an atheist, you are not welcome and are prohibited from joining.</p>
<p>What saddens me even more than the fact such discrimination still exists is the fact that in 2012, in an apparently developed, western country, this sort of discrimination is entirely legal and, apparently, tolerated by the citizens.</p>
<p>That, and the hypocrisy of the people who run the Scouts&#8230; If you profess membership of a religion, any religion, they will bend over backwards to &#8220;accommodate&#8221; you. As per today&#8217;s news story, they might even be prepared to wind back several decades of female emancipation and ensure that you do not sexually excite men by showing an elbow. That&#8217;s fine. You&#8217;re &#8220;a believer&#8221; of&#8230;.. something. Anything. And that&#8217;s ALL that matters.</p>
<p>But if you happen to not believe in a God or Gods, you are flat out not allowed to join. You are unsuitable. You are not welcome. Go away. We don&#8217;t want you.</p>
<p>What a very sad, somewhat unpleasant, group of people.</p>
<div></div>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ipsidixit.net/2012/03/30/scouts-and-discrimination/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>npd6 &#8211; Software now available</title>
		<link>http://www.ipsidixit.net/2011/08/04/npd6/</link>
		<comments>http://www.ipsidixit.net/2011/08/04/npd6/#comments</comments>
		<pubDate>Thu, 04 Aug 2011 12:50:45 +0000</pubDate>
		<dc:creator>sgroarke</dc:creator>
				<category><![CDATA[FPage]]></category>
		<category><![CDATA[icmp6]]></category>
		<category><![CDATA[IPv6]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[npd6]]></category>
		<category><![CDATA[ping6]]></category>

		<guid isPermaLink="false">http://www.ipsidixit.net/?p=619</guid>
		<description><![CDATA[<p>As per previous posts and discussions, my project to develop npd6 (Neighbor Proxy Daemon 6) is now advancing very rapidly.</p> <p>If you have a Linux gateway router terminating your ISP feed supporting IPv6, this may be just what you need. To summarise the problem it solves: your ISP has given you an /64 (or some [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.ipsidixit.net/wp-content/2010/02/IPv6-logo.png"><img class="alignleft size-full wp-image-227" style="margin-top: 10px; margin-bottom: 10px; margin-left: 15px; margin-right: 15px;" title="IPv6 Logo" src="http://www.ipsidixit.net/wp-content/2010/02/IPv6-logo.png" alt="" width="100" height="60" /></a>As per previous posts and discussions, my project to develop <em><strong>npd6</strong></em> (Neighbor Proxy Daemon 6) is now advancing very rapidly.</p>
<p>If you have a Linux gateway router terminating your ISP feed supporting IPv6, this may be just what you need. To summarise the problem it solves: your ISP has given you an /64 (or some other size) IPv6 prefix, with the last 64 bits (or whatever) entirely for your own use on a private-side of the network. The IPv6 addresses in use by your own devices may well not even be known to you &#8211; it&#8217;s possible that you use DHCP6 to statically pre-allocate them (yuck!) or more likely you are using <em>radvd</em> on the gateway to advertise the ISP-supplied IPv6 prefix and let the devices themselves choose what they wish to tag on to that. It may be vaguely predictable (based upon the device&#8217;s Ethernet MAC address) or totally unpredictable (as per the Windows 7 box I looked at the other day!)</p>
<p>For these devices to be able to reach the outside IPv6 world, there is a good chance that your ISP will use the ICMP6 <em>Neighbor Solicitation</em> mechanism &#8211; and your gateway needs to play along. Other articles on this site go into painful details about this mechanism, so let&#8217;s sum it up as: in a very vaguely similar way to IPv4 ARPs, a device may receive an IPv6 Neighbor Solicitation for a specific global address and, if it knows how to reach it, respond with a Neighbor Advertisement. So for example, your ISP has given you the global prefix:</p>
<p style="padding-left: 30px;"><span style="font-family: 'courier new', courier; font-size: small;">AAAA:AAAA:AAAA:AAAA:</span></p>
<p>and your home devices thus all end up with addresses using this prefix plus a variable suffix, of the form:</p>
<p style="padding-left: 30px;"><span style="font-family: 'courier new', courier; font-size: small;">AAAA:AAAA:AAAA:AAAA:BBBB:BBBB:BBBB:BBBB</span></p>
<p>So the Windows workstation which has chosen the 128-bit global address AAAA:AAAA:AAAA:AAAA:BBBB:BBBB:BBBB:BBBB tries to connect to ipv6.google.com. Out goes the connection, and when the response comes back, the ISP&#8217;s router says to your gateway: &#8220;Neighbor Solicitation: Do you know how to reach AAAA:AAAA:AAAA:AAAA:BBBB:BBBB:BBBB:BBBB?&#8221;</p>
<p>And you want to say back &#8220;Neighbor Advertisement: Sure, AAAA:AAAA:AAAA:AAAA:BBBB:BBBB:BBBB:BBBB is known to me &#8211; send me his traffic.&#8221;</p>
<p>And to do this today you need to <em>statically pre-configure</em> that full address into the Linux system. And if it changes, you need to change it. And if a new one appears, you need to ad it. And so on. Oh, and to add insult to injury, you cannot even display a list of which ones you have already configured in the system!!</p>
<p>And thus I offer npd6 as a solution: it runs on the gateway, and requires little configuration. You tell it your prefix and which is the ISP&#8217;s interface. There are a few optional knobs and levers. Then it runs and automatically responds to <em>any</em> Neighbor Solicitation received from the ISP for a device with your prefix.</p>
<h2>Status</h2>
<p>The code today is working well. It is easy to build on any typical Linux system. Soon I will package it and offer .debs, RPMs etc. It is highly efficient and low-impact in terms of CPU an so on.  Also, extensive debug options are built in, to assist if any problems occur.</p>
<p>To get it, please visit the GoogleCode hosting site at: <a href="https://code.google.com/p/npd6/">http://code.google.com/p/npd6/</a> and specifically the code at: <a href="https://code.google.com/p/npd6/source/checkout">http://code.google.com/p/npd6/source/checkout</a> (Subversion) or a tarball at <a href="https://code.google.com/p/npd6/downloads/list">https://code.google.com/p/npd6/downloads/list</a></p>
<p>If you want to try it out, please do download and build it. If you need help, please ask! Feel free to raise issues via: <a href="https://code.google.com/p/npd6/issues/list">http://code.google.com/p/npd6/issues/list</a></p>
<p>Good luck!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ipsidixit.net/2011/08/04/npd6/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
		<item>
		<title>npd6 &#8211; IPv6 neighbor proxy daemon &#8211; It lives!</title>
		<link>http://www.ipsidixit.net/2011/07/05/npd6-ipv6-neighbor-proxy-daemon-it-lives/</link>
		<comments>http://www.ipsidixit.net/2011/07/05/npd6-ipv6-neighbor-proxy-daemon-it-lives/#comments</comments>
		<pubDate>Tue, 05 Jul 2011 21:14:02 +0000</pubDate>
		<dc:creator>sgroarke</dc:creator>
				<category><![CDATA[FPage]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[ethernet]]></category>
		<category><![CDATA[icmp6]]></category>
		<category><![CDATA[IPv6]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[ping6]]></category>

		<guid isPermaLink="false">http://www.ipsidixit.net/?p=595</guid>
		<description><![CDATA[<p>As threatened in article IPv6 neighbor proxy daemon – npd6 and the associated design ramblings here, the npd6 project now lives and breathes.</p> <p>EDIT: 22 July &#8211; The project has really taken shape. Version 0.3 is now useful enough to be considered a working beta version. Building is very simple &#8211; do please try it [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-227" style="margin-top: 10px; margin-bottom: 10px; margin-left: 15px; margin-right: 15px;" title="IPv6 Logo" src="http://www.ipsidixit.net/wp-content/2010/02/IPv6-logo.png" alt="" width="100" height="60" />As threatened in article <a title="IPv6 neighbor proxy daemon – npd6" href="http://www.ipsidixit.net/2011/06/08/ipv6-neighbor-proxy-daemon-npd6/">IPv6 neighbor proxy daemon – npd6</a> and the associated design ramblings <a title="npd6 Design Document" href="http://www.ipsidixit.net/2011/06/08/npd6-design-document/">here</a>, the npd6 project now lives and breathes.</p>
<p><span style="font-size: x-large;"><strong>EDIT: 22 July &#8211; The project has really taken shape. Version 0.3 is now useful enough to be considered a working beta version. Building is very simple &#8211; do please try it out and let me know of any issues, good or bad.</strong></span></p>
<p>It&#8217;s absolutely early days, but, with plenty of limits and as-of-yet-unknown bugs, it does work&#8230;</p>
<p>I&#8217;m hosting it on Googlecode. It&#8217;s <a href="http://code.google.com/p/npd6/" target="_blank">here</a>. For a while yet I&#8217;ll not be making any binary or packaged versions available, or even autoconf/configure shenanigans &#8211; strictly source + Makefile.</p>
<p>If you want to give it a spin, do feel free. It&#8217;s going to change a LOT &#8211; we&#8217;re probably a month or so away from something I&#8217;d call &#8220;a usable, early <em>beta</em>&#8220;. Today it&#8217;s a &#8220;works for me pre-<em>alpha</em>&#8220;!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ipsidixit.net/2011/07/05/npd6-ipv6-neighbor-proxy-daemon-it-lives/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>IPv6 neighbor proxy daemon &#8211; npd6</title>
		<link>http://www.ipsidixit.net/2011/06/08/ipv6-neighbor-proxy-daemon-npd6/</link>
		<comments>http://www.ipsidixit.net/2011/06/08/ipv6-neighbor-proxy-daemon-npd6/#comments</comments>
		<pubDate>Wed, 08 Jun 2011 20:30:39 +0000</pubDate>
		<dc:creator>sgroarke</dc:creator>
				<category><![CDATA[FPage]]></category>
		<category><![CDATA[icmp6]]></category>
		<category><![CDATA[IPv6]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[ping6]]></category>
		<category><![CDATA[radvd]]></category>

		<guid isPermaLink="false">http://www.ipsidixit.net/?p=558</guid>
		<description><![CDATA[<p>I admit defeat&#8230; You know how it is: you&#8217;re searching for a solution to a technical problem, and you KNOW that someone else has had the same problem. In fact thousands of people have had the same problem. And it was fixed years ago. If I can just find that solution&#8230;</p> <p>EDIT: 22 July – [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.ipsidixit.net/wp-content/2010/02/IPv6-logo.png"><img class="alignleft size-full wp-image-227" style="margin-top: 10px; margin-bottom: 10px; margin-left: 15px; margin-right: 15px;" title="IPv6 Logo" src="http://www.ipsidixit.net/wp-content/2010/02/IPv6-logo.png" alt="" width="100" height="60" /></a>I admit defeat&#8230; You know how it is: you&#8217;re searching for a solution to a technical problem, and you KNOW that someone else has had the same problem. In fact thousands of people have had the same problem. And it was fixed years ago. If I can just find that solution&#8230;</p>
<p><strong>EDIT: 22 July – The project has really taken shape. Version 0.3 is now useful enough to be considered a working beta version. Building is very simple – do please try it out and let me know of any issues, good or bad.</strong></p>
<p>And find it, eventually (Google, Bing et al &#8211; Thank You!)  you do.</p>
<p>Except when you don&#8217;t.<a href="http://www.ipsidixit.net/2010/03/24/239/" target="_blank"> Back in this post I wrote</a> about a specific, but key, problem in implementing an IPv6 firewall/router on a Linux box, when attached to a &#8220;normal&#8221; ISP.</p>
<h2>What was the problem?</h2>
<p>In a nutshell, it was as follows. My ISP gives me a full IPv6 service, with a staticically allocated (i.e. fixed) global IPv6 address. They give me a /64, so I in turn have a full /64 to play with in my private net. Enough to network every dust particle in the house. (And this is one dusty house).</p>
<p>As I found, not surprisingly the ISP does not let me advertise address space <em>back </em>to them regarding which devices in my private-but-globally-addressed network actually exist. Given that, I rather naively hoped that they would thus blindly forward <em>anything</em> that was addressed to my (global prefix + private part) network to me regardless, and treat my gateway device as, in effect, a sort of default route for my IPv6 prefix.</p>
<p><span id="more-558"></span></p>
<h2>Could you give an example?</h2>
<p>Sure. Say my ISP has given me the IPv6 prefix of <em>2a01:e35:8b25:7ea9:</em>&#8230; A device inside my network then, by the magic of <em>radvd</em>, gets an address of, say: <em>2a01:e35:8b25:7ea9:1111:2222:3333:4444.</em></p>
<p>(If you need a primer on this stuff, <a href="http://www.ipsidixit.net/2010/02/24/228/" target="_blank">read all about it here</a>!)</p>
<p>Then assuming all the other myriad options are set up right, from that inside device I do a test ping6 of ipv6.google.com. And it fails.</p>
<p>As per my earlier article, it&#8217;s all down to my ISP, when they get traffic from the remote host (in fact in this case the <em>ICMP6 echo reply</em> from Google) destined for <em>2a01:e35:8b25:7ea9:1111:2222:3333:4444</em> rather than just &#8220;knowing&#8221; that such a global address must, by definition, be behind my connection, they go to the irritating lenghts of instead doing the whole Neighbor Solicitation dance with me.</p>
<p>And I find that unless I have performed the following command on my Linux gateway:</p>
<p>ip -6 neigh add proxy 2a01:e35:8b25:7ea9:1111:2222:3333:4444 dev eth0</p>
<p>the gateway device will not reply to the neighbor solicitation. And hence nothing works.</p>
<h2>OK, does it matter much?</h2>
<p>Heck yes.</p>
<ol>
<li><em>Each</em> inside device must be statically configured on the gateway.</li>
<li>It is currently not possible (I know this seems implausible&#8230;) from user-space to <em>list</em> or <em>show</em> what devices you have configured in this way.</li>
<li>The biggie: if you are dynamically allocating addresses in the network, you will not even KNOW what the end-point address is.</li>
</ol>
<p>Item 3 is in large part a consequence of using radvd. But even if one used (at the cost of a lot more work) an IPv6 DHCP server, you still have to statically pre-configure the end devices addresses on it, and lose the ability to add devices on-the-fly.</p>
<p>So we have a real stumblin block. Sure, for test purposes I can dig out the IPv6 address which my end station has picked, and bang in the neighbor proxy command on the gateway. And it works fine.</p>
<p>But in terms of manageability and scalability it&#8217;s a freakin&#8217; disaster.</p>
<h2>Must be easy to fix, surely?</h2>
<p>Well if it is, no one I&#8217;ve spoken to has any idea! It&#8217;s a great, glaring black-hole. IPv6 on Linux simply currently appears to have no support for automating the proxying of global/private addresses <em>using the Neighbor Solicitation</em> mechanism. I can only assume that it was never thought this would be a problem, and Neighbor Solicitation would only ever be used to directly connected devices.</p>
<p>The ability to force a neighbor proxy as shown here is pretty obviously an after-thought. The real give away is the inability to list current defined proxies&#8230;</p>
<h2>So what we gonna do?</h2>
<p>I intend to fix it!! I&#8217;m going to use the article linked to <a href="http://www.ipsidixit.net/2011/06/08/npd6-design-document/">HERE </a>as a working document to put together a rough and ready design for a user-space daemon to fix this. It&#8217;s going to be simple to use &#8211; that&#8217;s key.</p>
<p>The main elements I can think of as a start are as follows:</p>
<ol>
<li>Run in user-space (I hope!)</li>
<li>Have a single, simple config file.</li>
<li>To have no prior knowledge of devices inside the networks.</li>
<li>Only prior knowledge, via static config, is the IPv6 prefix.</li>
<li>If a neighbor solicitation is received for our <em>prefix</em>, regardless of the suffix, we respond positively.</li>
</ol>
<p>Easy? No idea! I&#8217;m a useful enough network programmer but not at all familiar with the Linux IPv6 stack from the code perspective. But the functionality is, conceptually, not complex.</p>
<p>The key gotchas I forsee are:</p>
<ol>
<li>How we hook incoming neighbor solicitations. Period.</li>
<li>Then as per (1), but now with the &#8220;I want to run in user-space&#8221; goal. <img src='http://www.ipsidixit.net/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </li>
<li>What I do when someone points out (and they will&#8230;) that I&#8217;m going to violate several dozen RFCs by doing this.</li>
</ol>
<p>Piece of cake. As per above link, <a href="http://www.ipsidixit.net/2011/06/08/npd6-design-document/">the working design doc will be here</a>. Very soon. All contributions welcome &#8211; and I really do mean that!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ipsidixit.net/2011/06/08/ipv6-neighbor-proxy-daemon-npd6/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Linux file-sharing in a home wifi network</title>
		<link>http://www.ipsidixit.net/2011/05/12/linux-file-sharing-in-a-home-wifi-network-2/</link>
		<comments>http://www.ipsidixit.net/2011/05/12/linux-file-sharing-in-a-home-wifi-network-2/#comments</comments>
		<pubDate>Thu, 12 May 2011 11:33:34 +0000</pubDate>
		<dc:creator>sgroarke</dc:creator>
				<category><![CDATA[FPage]]></category>
		<category><![CDATA[cache-fs]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[nfs]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.ipsidixit.net/?p=458</guid>
		<description><![CDATA[ <p>The scenario: the home network is centered around a Linux server. This acts as (amongst a number of other things) a large data repository. All our media files, photos, music and so on are stored on it. Apart from the convenience of having it all centrally located, it also provides data security: all critical [...]]]></description>
			<content:encoded><![CDATA[<div>
<p><a href="http://www.ipsidixit.net/wp-content/2011/05/network-tools.png"><img class="size-full wp-image-509 alignleft" style="margin-top: 10px; margin-bottom: 10px; margin-left: 15px; margin-right: 15px;" title="network-tools" src="http://www.ipsidixit.net/wp-content/2011/05/network-tools.png" alt="" width="154" height="154" /></a>The scenario: the home network is centered around a Linux server. This acts as (amongst a number of other things) a large data repository. All our media files, photos, music and so on are stored on it. Apart from the convenience of having it all centrally located, it also provides data security: all critical data is archived hourly using <em>rsnapshot</em>, such that there is always a backup from at least one month ago in the event of data being e.g. accidentally deleted. It uses a single 1TB disk as the main data store, with a second 1TB disk for the snapshots. Then in addition to that, really <em>really</em> critical data (the irreplaceable stuff) is archived every night to an off-site location. Anyway, in recent times my children have discovered the pleasures of photography&#8230; Vast quantities of pictures to be put on a PC and secured. To date it&#8217;s gone like this:</p>
<ul>
<li>Kids use a single laptop, running Linux.</li>
<li>Each has an account on the laptop.</li>
<li>Plug camera in to laptop and pull the pictures on to the laptop.</li>
<li>In background, <em>cron</em> archives them off to the server using <em>rsync</em> over <em>ssh</em>.</li>
</ul>
<p>As far as the kids themselves are concerned, there&#8217;s (a) a single laptop and (b) it has all their photos on it and (c) papa has assured them that if something terrible happened to the laptop, the pictures can be restored from the server.</p>
<p>Thus far, fine.</p>
<h1>The network expands</h1>
<p>Time to change&#8230; Precipitated by an additional laptop, things get kinda complicated. I want the laptops to be &#8220;floating&#8221;, and used by either child. No &#8220;the HP is mine, the IBM is his&#8221;. However that then makes it tricky: with only the single laptop it is the primary (since only) data store for their photos. Backups aside, it&#8217;s straightforward. So I need to shift the primary data stores off the laptops themselves and having them full-time on the server, and accessed over the network. Which is fine, except that performance it going to be an issue: these are laptops, and they are connected to the home network using wifi, so network file systems are potentially a problem (you ever tried regularly scanning several thousand photos over a wifi connection&#8230;? &#8230;it&#8217;s not what you want to do regularly!)</p>
<p>So we&#8217;re going to need network file systems with some sort of magical optimisation&#8230;</p>
<p><span id="more-458"></span></p>
<h1>The solution</h1>
<p>We&#8217;re going to create a solution with several key elements:</p>
<ul>
<li>The server is going to have data stores for each laptop user, shared out on the network using NFSv4.</li>
<li>The clients (the laptops) are going to use a caching file system on top of the NFS shares, to attempt to provide less load on the wifi connections.</li>
<li>The clients are going to need to auto-mount the correct data stores depending upon which user is using them.</li>
</ul>
<p>A quick word on file system caching here: books can (and have!) been written on such subjects&#8230; Suffice to say that it&#8217;s easy to fall in to the trap of thinking that caching is always a good idea, and simply must improve performance. Not at all. Any file system cache can provide improved OR degraded performance depending upon how it is used (e.g. lots of small files, or large files, regularly accessed, infrequently accessed, underlying file system type,&#8230;. the list is long and has multiple permutations)</p>
<p>Suffice to say that here the “performance improvement” we are after is load reduction on the wifi network. I am not going to go in to the whys and wherefores, but here will blindly assume that a caching layer between the client and the NFS shares is a good idea in the circumstances. Your mileage may vary &#8211; and BTW, it&#8217;s rather fun to test and compare. Try it!</p>
<h1>The Elements</h1>
<ul>
<li>The server is a Linux server running Ubuntu Server 11.04. (None of this configuration is going to be too highly Ubuntu, or even Debian-derived, specific, so any Linux will do)</li>
<li>NFS Server on the, er, server.</li>
<li>Ubuntu laptop clients, again 11.04, but also fairly generically applicable.</li>
<li>Clients to have NFS v4 client code, Cache-fs and automouting capability.</li>
</ul>
<h1>Setting up the Server side</h1>
<p>We&#8217;ve 3 users to be catered for in this exercise. For the rest of this article I&#8217;m going to call them A, B and C. The server itself goes by the name bobby.</p>
<p>On bobby, if not there already, I need to install the following packages:</p>
<ul>
<li>nfs-common</li>
<li>nfs-kernel-server</li>
<li>portmap</li>
</ul>
<p>The locations, on the server, of my data stores are going to be:</p>
<ul>
<li>/data/A</li>
<li>/data/B</li>
<li>/data/C</li>
</ul>
<p>First step is to create binding within the exports directory. Edit /etc/fstab to look like this:</p>
<pre># NFS bindings to /export
/data/A              /export/A        none    bind    0 0
/data/B              /export/B        none    bind    0 0
/data/C              /export/C        none    bind    0 0</pre>
<p>Make sure that the directories /export/A, B &amp; C are created, then a</p>
<pre>mount -a</pre>
<p>should bind the real locations to the export locations. Check with a</p>
<pre>mount</pre>
<p>which should be display something like this:</p>
<pre>/mnt/DATA1/data/A on /export/A type none (rw,bind)
/mnt/DATA1/data/B on /export/B type none (rw,bind)
/mnt/DATA1/data/C on /export/C type none (rw,bind)</pre>
<p>and shows that the bindings are there. This also actually illustrates another point: in actual fact, the ultimate location of the data stores are /mnt/DATA1/data/A, &#8230;B etc. These are then symlinked to /data/A, &#8230;B etc. for convenience. One can refer to the symlinked location on fstab no problem. However the mount command dereferences that and shows the final location as here. That&#8217;s all fine.</p>
<p>Now a word about NFS server configuration&#8230;.! It&#8217;s a potential minefield. If you need to, start off over here: <a href="http://help.ubuntu.com/community/SettingUpNFSHowTo">Ubuntu Guide to NFS</a></p>
<p>But you may be better off trying this ultra-simplified version I present, before thinking about tweaking stuff.</p>
<p>For now, all I do is edit /etc/exports to contain:</p>
<pre>/export	 192.168.0.0/24(rw,fsid=0,insecure,no_subtree_check,async)
/export/A    192.168.0.0/24(rw,nohide,insecure,no_subtree_check,async)
/export/B    192.168.0.0/24(rw,nohide,insecure,no_subtree_check,async)
/export/C    192.168.0.0/24(rw,nohide,insecure,no_subtree_check,async)</pre>
<p>The only parts of that I&#8217;ll go in to are:</p>
<ul>
<li>The /export locations are those that you bind to in the fstab declarations.</li>
<li>The ip range (note it&#8217;s a range, not a single address) covers the location of my clients (i.e. the laptops on the home network all have addresses of the form 192.168.0.XXX)</li>
<li>That first line is required!</li>
<li>rw = read/write access (probably what you want)</li>
</ul>
<p>and then fire up the NFS server with:</p>
<pre>/etc/init.d/nfs-kernel-server start</pre>
<p>All being well, we&#8217;re then pretty much done on the server side.</p>
<h1>A word on user IDs&#8230;</h1>
<p>NFS is&#8230;.. kinda quirky. Some of those quirks relate to how remote clients are recognised (authenticated) by the server. There are a multitude of ways this can happens, all optional and all somewhat different. Many are also rather complex&#8230; Want some advice? OK: since the server and the clients are all under &#8220;your&#8221; control, make it easy. And &#8220;easy&#8221; here means as follows: ensure that users&#8217; UIDs are the same on the server and all the clients.</p>
<p>Put practically, here&#8217;s what I&#8217;m talking about: on the server, do:<br />
cat /etc/passwd<br />
to produce something reminiscent of this (lightly obfuscated)</p>
<pre>.
.
.
A:x:1001:100:person named A:/home/A_directory:/bin/sh
B:x:1002:100:person named B:/home/B_directory:/bin/sh
C:x:1003:100::/home/c_directory:/bin/sh</pre>
<p>It&#8217;s the numbers you care about: for example, User A has UID=1001 and GID=100.</p>
<p>Now check the same file on either future client laptop:</p>
<pre>.
.
.
C:x:1003:1000:c,,,:/home/ccc:/bin/bash
A:x:1001:1001:a:/home/aaa:/bin/bash
B:x:1002:1002:b:/home/bbb:/bin/bash</pre>
<p>Note that we&#8217;ve used the same UIDs for a given user.</p>
<p>If you&#8217;ve a lot of users, or an existing setup which you cannot easily change, then pick (and learn about!) one of the many NFS schemes for dealing with this. But if you&#8217;ve a small, and/or changeable set up, do yourself a big favour and go with matched UIDs&#8230;!</p>
<h1>The Clients &#8211; Basic NFS</h1>
<p>This is where things get fun. Before we dive in to caching, automounting and so on, let&#8217;s make sure that basic NFS works OK for us. On a laptop, edit /etc/fstab to be like this:</p>
<pre>.
.
.
# NFS
bobby:/C /home/cc/bobby    nfs4     rw,hard,intr    0 0
bobby:/A /home/aa/bobby    nfs4     rw,hard,intr    0 0
bobby:/B /home/bb/bobby    nfs4     rw,hard,intr    0 0</pre>
<p>Note:</p>
<ul>
<li>bobby is the server name. You could use the raw IP address here, or if DNS is working (or you&#8217;ve a static entry ion /etc/hosts) you can use the name.</li>
<li>Note the server location is only given as &#8220;/A&#8221;, not &#8220;/export/A&#8221;. This is a difference between NFS3 and NFS4.</li>
<li>the mount point on the client is entirely arbitrary, but it makes sense for it to be &#8220;under&#8221; the particular user&#8217;s home directory, as here.</li>
</ul>
<p>With that done, do a</p>
<pre>mount -a</pre>
<p>and check that all the three mounts work. Apart from checking via a mount command’s output, also login as each user, go to that user&#8217;s NFS-mounted directory, and create a file, edit it, and delete it. Does that all work OK? If so, grand. If not, STOP and get the basic NFS setup working before proceeding! This is really important&#8230; Debug basic NFS issues first.</p>
<h1>The Clients &#8211; Caching</h1>
<p>The next layer we are going to introduce is client-side caching.</p>
<p>Again, I&#8217;m going to present a highly simplified (and highly effective!) setup, glossing over a vast array of optional complexity and trouble&#8230; (If you fancy it, here&#8217;s a good starting point for the details: <a href="http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6/html/Storage_Administration_Guide/fscachemain.html">Red Hat Guide to FS-Cache</a></p>
<p>We&#8217;re going to use FS-Cache. Install it using:</p>
<pre>apt-get install cachefilesd</pre>
<p>All you really need to then change is to edit /etc/default/cachefilesd and set:</p>
<pre>RUN=yes</pre>
<p>Then start it using:</p>
<pre>/etc/init.d/cachefilesd start</pre>
<p>Note that you <em>may</em> need to add the mount-attribute <em>user_xattr</em> on the file system containing the cache files (which will typically be the root file system or, if you have /var broken out on a separate partition, then that one) So your /etc/fstab entry might look like this:</p>
<pre>UUID=5f63b76a-d367-49e4-a540-d7ab77b891fe /               ext4    errors=remount-ro,<strong><em>user_xattr</em></strong> 0       1</pre>
<p>Go back to your /etc/fstab and edit each NFS line to include the option fsc, like this:</p>
<pre>.
.
.
# NFS
bobby:/C /home/cc/bobby    nfs4     rw,fsc,hard,intr    0 0
bobby:/A /home/aa/bobby    nfs4     rw,fsc,hard,intr    0 0
bobby:/B /home/bb/bobby    nfs4     rw,fsc,hard,intr    0 0</pre>
<p>Then (re)mount the NFS shares and see if it works!</p>
<p>Here&#8217;s a good point, if you wish, to test one mount with caching and one without, and run some comparisons in your environment and mode of using it, to see how much (if at all!) caching helps&#8230; If you alternatively wish to skip that and just check that &#8220;caching is doing doing something so I know it works in some manner or other&#8221; then you can just</p>
<pre>cat /proc/fs/fscache/stats</pre>
<p>and check for signs of any life. See some? Great. Plough on.</p>
<h1>The Clients &#8211; Automounting</h1>
<p>Why not just leave things as they are? Each laptop, when powered up, mounts all the users&#8217; NFS shares? Well, you could. But it&#8217;s not ideal.</p>
<ul>
<li>Bandwidth and time. Mounting all, when likely only one will be used takes time and bandwidth.</li>
<li>Concurrency. In theory, and hopefully practice, NFS will handle this. But it&#8217;s just so much neater and less contentious (joke intended&#8230;) to only mount the share where and when it&#8217;s being used. Then it gets dropped when it&#8217;s not used.</li>
</ul>
<p>So unmount the NFS shares in place, and then edit /etc/fstab to comment them out there too. From here on the shares will not be mounted from fstab, but by the automounter.</p>
<p>We need to install automounter first, so do that using:</p>
<pre>apt-get install autofs</pre>
<p>The autofs documentation, and many of the online resources, are fairly confusing for a newcomer! The automounter is a very flexible piece of software, and has to handle many different situations &#8211; hence the complexity. But we can keep it simple&#8230;</p>
<ul>
<li>First, edit /etc/default/autofs</li>
<li>Add/uncomment</li>
</ul>
<pre>MOUNT_NFS_DEFAULT_PROTOCOL=4</pre>
<ul>
<li>In theory, you can leave this and specify we&#8217;re using NFSv4 on the mount options &#8211; however I had a lot of trouble with this, and given that we&#8217;re in a simple all-v4 environment, it&#8217;s a lot simpler to just change it here.</li>
<li>You might want to think of tuning the timeouts here, but don&#8217;t feel obliged. Leave everything else as-is.</li>
<li>Edit /etc/auto.master</li>
<li>Comment out the last line, and add a new one, like this:</li>
</ul>
<pre>.
.
.
# Commented out next line:
#+auto.master
# My new nfs automount details:
/-	/etc/auto.nfs</pre>
<ul>
<li>So you comment out the <span style="font-family: 'courier new', courier;">+auto.master</span> and add in the reference to<span style="font-family: 'courier new', courier;"> /etc/auto.nfs</span></li>
<li>Now create<span style="font-family: 'courier new', courier;"> /etc/auto.nfs</span> and make it similar to this:</li>
</ul>
<pre>/home/aa/bobby	-rw,fsc,hard,intr	bobby:/export/A
/home/bb/bobby	-rw,fsc,hard,intr	bobby:/export/B
/home/cc/bobby	-rw,fsc,hard,intr	bobby:/export/C</pre>
<ul>
<li>Note the <span style="font-family: 'courier new', courier;">/home/aa/bobby</span> line is arbitrary &#8211; it is the local mount point and can have any name.</li>
<li>Note also the <span style="font-family: 'courier new', courier;">fsc </span>parameter, to ensure we use the caching filesystem layer as previously setup.</li>
</ul>
<h1>Conclusion</h1>
<p>And that&#8217;s about it. With such a configuration, my kids can logon to either laptop, open &#8220;their&#8221; folder called <span style="font-family: 'courier new', courier;">bobby/</span> and, hey presto, they have full access to their data on the server, all invisibly assisted by a caching layer.</p>
<p>It&#8217;s a little fiddly to set up, but not so confusing if you remember how it breaks down:</p>
<ul>
<li>Set up NFS on the server and share out the server locations.</li>
<li>Set up NFS on the clients and ensure simple mounting works.</li>
<li>Set up FS-Cache on the clients and check that NFS uses it OK via normal mounting.</li>
<li>Finally set up automounter on the client to have NFS automagically only mount as and when required.</li>
</ul>
<h1>Addendum 1: Shutdown hangs&#8230;</h1>
<p>With everything up and running nicely, I noticed one frequent problem with the client machines: they would no longer shutdown (or thus reboot) properly. The shutdown started but usually &#8220;hung&#8221; before completion. I&#8217;m pretty certain it&#8217;s a &#8220;shutdown job ordering&#8221; type of issue, whereby NFS unmounts, turning of caching and killing the wifi are either in the wrong order or maybe just too close in time.. So one may need to tweak the shutdown/reboot kill tasks. Which these days is more of a headache than it used to be &#8220;in the good old days&#8221; since we have to consider tasks run via SysV rcN.d/ jobs and &#8220;upstart&#8221; jobs as well&#8230;</p>
<p>When I&#8217;ve tuned them right, I&#8217;ll try and remember to update here. But if you see the shutdown/reboot hanging issue, the solution is in that whole area. Strictly speaking, it&#8217;s a Ubuntu distro bug.</p>
<p>&nbsp;</p>
<p>EDIT: 17 May. The hang on shutdown/reboot issue is surprisingly difficult to resolve! Looking in to it it seems that autofs and wifi have a long history of not getting along &#8211; Ubuntu has a heap of bug reports concerning this issue, over quite a period of time. Yet they seem to not get resolved. For my part, for now I&#8217;ve actually stopped using the auto-mounting feature, as it&#8217;s just a &#8220;nice to have&#8221; and far and away the least critical aspect of the above setup. A shame, but not a big shame.</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.ipsidixit.net/2011/05/12/linux-file-sharing-in-a-home-wifi-network-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Content filtering in a home network</title>
		<link>http://www.ipsidixit.net/2011/02/07/content-filtering-in-a-home-network/</link>
		<comments>http://www.ipsidixit.net/2011/02/07/content-filtering-in-a-home-network/#comments</comments>
		<pubDate>Mon, 07 Feb 2011 11:04:23 +0000</pubDate>
		<dc:creator>sgroarke</dc:creator>
				<category><![CDATA[FPage]]></category>
		<category><![CDATA[DNS]]></category>
		<category><![CDATA[ethernet]]></category>
		<category><![CDATA[filter]]></category>
		<category><![CDATA[firewall]]></category>
		<category><![CDATA[IPv6]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[nslookup]]></category>
		<category><![CDATA[opendns]]></category>
		<category><![CDATA[shorewall]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.ipsidixit.net/?p=425</guid>
		<description><![CDATA[<p>With two young children starting to make increasing use of the Internet, my attention has turned in recent times to the thorny subject of Content Filtering. This posting is actually going to look at a technical approach I settled upon, however one cannot help mentioning, at least in passing, some of the wider issues involved.</p> [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.ipsidixit.net/wp-content/2011/02/footer_logo.gif"><img class="size-full wp-image-447 alignleft" style="margin-left: 50px; margin-right: 50px; margin-top: 30px; margin-bottom: 30px;" title="opendns_logo" src="http://www.ipsidixit.net/wp-content/2011/02/footer_logo.gif" alt="" width="100" height="40" /></a>With two young children starting to make increasing use of the Internet, my attention has turned in recent times to the thorny subject of Content Filtering. This posting is actually going to look at a technical approach I settled upon, however one cannot help mentioning, at least in passing, some of the wider issues involved.</p>
<p>As a parent I do not believe in raising children in some sort of bubble, totally devoid of anything that could possibly &#8220;harm&#8221; them. That applies to the Internet too &#8211; my hope is to raise children who are able to understand and deal with things, rather than require protection from them. To that end, Internet access for my children involves their parents first and foremost! They use a laptop, after asking permission, in the kitchen, in view of everyone else. I&#8217;m interested in what they are doing on it (genuinely so, not as some excuse to snoop!) and they want me to help and guide them. Email? Sure, make full use of it. But all emails sent to your address also get forwarded to me too guys&#8230; Why? So I can see what you&#8217;re receiving! Very open. Very honest. Nothing underhand. Those are the rules in this house.</p>
<p>And that approach actually covers probably 90% of what is required. However there&#8217;s still a small part that needs attention. As most adults know, there&#8217;s some weird stuff in some corners of the Internet. <em>Really</em> weird. <em>Disturbingly</em> weird. Stuff which I do not want my young children to see, even if accidentally. Being a very liberal sort, and totally anti-censorship with regard to what consenting adults view, I do not support any move to remove such stuff from the Internet. Weird, sick, depraved, whatever&#8230; Some of it may not be at all nice, but it&#8217;s there and it can be found. I just don&#8217;t want young children to accidentally find it. So what is a network engineer father to do&#8230;?</p>
<h1>Content filtering &#8211; 4 approaches</h1>
<p>Broadly speaking there are four way of approaching content filtering in the home environment:</p>
<ul>
<li>Workstation filtering</li>
<li>Network filtering</li>
<li>ISP filtering</li>
<li>DNS blocking</li>
</ul>
<p><span id="more-425"></span>The first three are all variations on the same theme. They vary in terms of the &#8220;Where do you do it?&#8221;</p>
<h2>Workstation</h2>
<p>There are many software packages out there which will filter content locally on the PC being used to browse the web. In a similar manner to that used by the more familiar virus detection software, one can purchase and run content filtering software which aims to identify and block various categories of content. The difficulty faced with this approach is that it&#8217;s not at all easy to identify what to block! Just to take the most obvious candidate category for blocking: pornography. The software can, and will, have lists of the names of the popular, known web-sites with porn. And with some enormous proportion of the Internet being porn, that will already be a long long list! Then we have the challenge of the fact that every day goodness knows how many hundreds of new porn sites will appear, and old ones disappear. The list of sites cannot be fully up to date. So the software will also need to include elements of heuristic detection: identifying porn indirectly and blocking it. So we&#8217;re now into looking and scanning all the traffic to and fro for words or patterns which might identify it as porn.  And so on. It&#8217;s a computationally intensive exercise, and requires frequent updating with new lists of patterns, URLs, IP addresses and so on.</p>
<p>The task is very similar to virus detection, with the frequent updates required, slowing down of communication to an extent, higher CPU usage, and so on.</p>
<p>The software out there is worth consideration for some &#8211; I&#8217;m not saying it&#8217;s a bad approach. But it has unavoidable limitations. Two obvious ones which apply to me are:</p>
<ul>
<li>Locked to a particular PC &#8211; If I install the software on one PC, then I cannot let the kids use another PC as it will be unprotected, unless I pay for and install the software there too.</li>
<li>Linux. A big issue for me is that we only have a single Windows PC in the house (hooray!) All the others (too many&#8230; way too many&#8230;) including that used by the children, run Linux. And such packages are few and far between for Linux&#8230;</li>
</ul>
<h2>Home network</h2>
<p>An approach I used for a while, with success, was to filter on the gateway device on my network. A quick summary here: at home my Internet connection terminates on a gateway firewall/router system. This system performs all manner of network-related functions. The key one is to run my Linux-based firewall. A host of other jobs get handled by this box too: VPN termination, media serving, DHCP, IPv6 routing, the list is long. Given that all of our Internet traffic traverses this system it is ideally suited to perform a filtering function.</p>
<p>To that end, for a while I ran <a href="http://www.dansguardian.org/" target="_blank">Dans Guardian</a> on my firewall. This is a sophisticated bit of software, and not entirely trivial to set up and get working. Apart from quite a lot of configuration itself, it also requires a web-proxy to be running on the firewall. I ran <a href="http://www.squid-cache.org/">squid</a> to fulfil that requirement. And then there&#8217;s the requirement to &#8220;hook&#8221; users into it. That involves either configuring the workstation to use a designated web proxy (and possible authentication required there &#8211; depends upon what exactly you want to achieve) or using IPTables on the firewall to intercept traffic from a given workstation and force it via the proxy. Various approaches, all quite interesting, but only if you find networks interesting&#8230; Many would find it simply &#8220;complicated&#8221;.</p>
<p>Once up and running, however, there are then further challenges to be faced. Firstly there&#8217;s the question of overhead. That is, how much load does it place on the gateway device, and hence how much delay or slowness does it introduce to the web browsing. My kids may not need the snappiest, lightening fast response times possible, but nor do they want to wait tens of seconds to see a page, or have some You Tube video constantly stop and start. Let me be clear here (and make sure I&#8217;m fair to Dans Guardian): if the device running it is powerful (in terms of CPU, memory, disk and so on) then it&#8217;s great. Really good. Trouble is, however, that a lot of boxes used as gateway routers/firewalls are not, by their nature, so highly specified. And that applied to me. My installation was, frankly, not fast enough. Much of the time it would work OK-ish, but often there would be very long delays indeed.</p>
<p>If you have a powerful box you can dedicate to such filtering, then do go ahead and consider it.</p>
<p>On other issue I also had to tackle was that of updates: as described for the Workstation solution, filtering software, wherever it is located, needs to be kept up to date. Dans Guardian does not come with an update mechanism, nor source of updates. There are sources of such updates out there if you search, but again, it&#8217;s an extra piece of work to do this and get it all set up correctly, auto updating silently every day.  As before, not a criticism of the software that has been made freely available &#8211; but something that does need to be taken in to account.</p>
<h2>ISP</h2>
<p>Many ISPs offer a filtering service to their customers. This is of course attractive, as it entirely removes the need to perform the filtering and blocking locally to the home network. The work is offloaded to the ISP. While there may be a charge associated with this, it may be worth considering. The main, and maybe for many significant, disadvantage to it is the all-or-nothing approach. If you have many PCs (and hence different users) within the home network, you may only want to block certain stuff from certain PCs. I may not want my kids viewing<em> DominatrixFrenchMaids.com, </em>but (purely for research purposes, of course) their father may need to. (God knows, such a site probably exists, but I dare not look&#8230;) More realistically, there are other sites which are more genuinely OK for adults, but not for young children. If one has an interest in 20th Century history, a sad reflection on humankind is that there are some horrible things which can be seen&#8230; For older children and adults, that&#8217;s fine and indeed educational. But not below a certain age. I&#8217;d like to maintain the illusion of a nice world for at least a little while longer.</p>
<p>So ISP filtering is attractive in terms of removing the work from the home. But it does come, in general, with a certain amount of inflexibility.</p>
<h2>DNS blocking</h2>
<p>This last technique is somewhat different from the others. Most people have at least some awareness that the names we use on the Internet (www.ipsidixit.net) actually map on to so-called IP addresses. For example www.ipsidixit.net is mapped via a DNS (Domain Name Service) to the IP address 217.70.191.54 (And to IPv6 2001:4b98:dc0:41:216:3eff:feaa:964a &#8211; I&#8217;m soooo hip and trendy&#8230;)</p>
<p>Yet no one in their right mind (nor even a network engineer) bothers with the numerical version. You just bang in the name and have your computer us DNS to resolve it to an IP address.</p>
<p>Most PCs will use one or more DNS devices specified and operated by their ISP. Used &#8220;normally, for example, my ISP (free.fr) provides two DNS systems for workstations to use.</p>
<p>However one does not need to use their suggestions. One can, in general, use other DNSs operated by third-parties.</p>
<p>The point is, then, that if one used a DNS service which had a constantly updated blacklist of sites which are &#8220;undesirable&#8221;, one could block access to them by simply declining to resolve them to their correct address. This then offers the benefits of ISP Blocking in so far as the load of shifted outside of the home network, but with the added flexibility that only workstations that require protection need use the &#8220;filtering&#8221; DNS. Other workstations can use the normal DNS.</p>
<p>I found that <a href="http://www.opendns.com/">OpenDNS</a> provide such a service, and have stated to make use of it. It&#8217;s free (they have some paid options too &#8211; but the free one seems fine for me) I have no association with OpenDNS, and am only &#8220;promoting&#8221; them as what they offer seems neat and useful. If others have knowledge of other similar services, please do post them in a comment &#8211; I&#8217;m not trying to make this exclusive to OpenDNS! In fact I&#8217;d like to compare OpenDNS to some others.</p>
<p>The service they offer is to provide DNS addresses which can have a selectable level of filtering applied. The spectrum is covered, from porn, violence, drug use, etc. through to shopping sites, social networking sites, etc. You get to choose which categories to block and which to allow.</p>
<p>And it does seem to work really rather well indeed. Below I am going to detail how I set it up within my network, integrating it within the DNS caching system already used.</p>
<p>The main weakness of the system is that with some knowledge and effort it can be circumvented (as, of course, can most systems) One could take the trouble to manually find the Name &lt;&#8211;&gt; IP mapping for a domain and enter that directly into a browser, thereby bypassing the DNS. However such a bypass would be very cumbersome to use, since even if you use an IP to land on a page, probably any link off that page will in turn require DNS, and would then need to be manually decoded, etc. Workable, but hard work. By the time my kids are knowledgeable enough to work all that out, they will probably be old enough to look after themselves!</p>
<h1>Integrating OpenDNS into a Linux firewall, already running DNSMasq</h1>
<p>My home network has <a href="http://www.thekelleys.org.uk/dnsmasq/doc.html">DNSMasq</a> running on a central gateway/server/firewall box. DNSMasq is responsible for DHCP (i.e. allocating IP addresses on my home network) and also DNS caching. To that end, it announces, via DHCP, that it  is the DHCP server to be used by devices. Then it, in turn, resolves addresses via the ISP-supplied DNSs. It caches then DNS lookups locally.</p>
<p>In the DHCP configuration it has a pool of addresses available for any device to use, but most of the devices on the network have pre-allocated addressees reserved for them within the DNSMasq configuration. These are allocated based upon the Ethernet MAC address of a device. This is a very common technique to use with DHCP.</p>
<p>Given that, where now a device will be handed an IP address and the address of a DNS server to use (where that DNS server will actually be the same as the DNSMasq device itself) we want to change the config so that for certain devices (the childrens&#8217; PC) when an IP address is handed out it will instead be given with the DNS addresses of the OpenDNS filtering systems. Then all DNS requests from that PC will no longer be locally forwarded to the gateway device, but will instead be routed out externally to OpenDNS, where they can be answered or blocked as appropriate.</p>
<p>The DNSMasq config to achieve this is slightly fiddly, so I am providing it here more or less in its entirety (a few names omitted and some light obfuscation of MACs etc.), but only highlighting the parts that particularly pertain to the OpenDNS filtering setup.</p>
<pre style="padding-left: 30px;"># Configuration file for dnsmasq.
domain-needed
resolv-file=/etc/resolv.conf
no-resolv
no-poll

# Add other name servers here, with domain specs if they are for
# non-public domains.
server=/localnet/192.168.0.22</pre>
<pre style="padding-left: 30px;"><strong><em><span style="color: #ff6600;">This part is not related to OpenDNS in any way: I don't use my ISP's DNS for normal use - I instead use Google's Public DNS.
</span></em># Google Public DNS servers
server=8.8.8.8
server=8.8.4.4</strong>

# Add local-only domains here, queries in these domains are answered
# from /etc/hosts or DHCP only.
local=/localnet/

interface=eth1
expand-hosts
domain=localnet

# For general purpose use, use this range.
dhcp-range=192.168.0.128,192.168.0.160,12h</pre>
<pre style="padding-left: 30px;"><strong><span style="color: #ff6600;">This is for OpenDNS. We use the dhcp-mac config to tag these special devices for filtering:
</span># MAC list for openDNS filtering
dhcp-mac=opendns,00:c0:9f:12:34:56	# Laptop on-board
dhcp-mac=opendns,00:90:4b:12:34:56	# Laptop wifi</strong></pre>
<pre style="padding-left: 30px;"><strong><span style="color: #ff6600;">Here we're back for normal dhcp-host preallocation for known unfiltered devices:
</span></strong># Most ip addresses are pre-allocated here
dhcp-host=00:50:ba:12:34:56,aname,192.168.0.2,720m
dhcp-host=00:18:8B:12:34:56,anothername,192.168.0.3,5m
dhcp-host=00:90:4b:12:34:56,laptop_wifi,192.168.0.4,720m
dhcp-host=00:26:37:12:34:56,galaxy,192.168.0.5,60m
dhcp-host=00:18:41:12:34:56,magic,192.168.0.6,60m
dhcp-host=00:26:82:12:34:56,eva9150,192.168.0.7,720m
dhcp-host=00:c0:9f:12:34:56,laptop_eth,192.168.0.8,720m
dhcp-host=00:14:29:12:34:56,camera,192.168.0.10,120m
dhcp-host=00:21:5A:12:34:56,printer,192.168.0.11,720m
dhcp-host=00:40:63:12:34:56,aservername,192.168.0.22,infinitem</pre>
<pre style="padding-left: 30px;"><strong><span style="color: #ff6600;">The devices tagged "opendns" above here get special DHCP options pointing them to the OpenDNS filtering-servers.
</span># OpenDNS content filtering servers
# Specify the two OpenDNS first, then ourselves third for local stuff
dhcp-option=opendns,6,208.67.222.222,208.67.220.220,192.168.0.22</strong></pre>
<pre style="padding-left: 30px;"><strong><span style="color: #ff6600;">Note also the "192.169.0.22" on the end - this is optional, if you still want the filtered devices to be able to resolve local names.
</span></strong>
dhcp-authoritative
cache-size=150
clear-on-reload</pre>
<p>Anyone who has an existing DNSMasq configuration should find the above more than enough to change it to point arbitrary devices at the OpenDNS systems.</p>
<h1>Summary</h1>
<p>Nothing, but nothing, replaces a conscientious adult supervising, guiding and helping get to grips with the Internet. However even with that it&#8217;s still all too easy for some stuff to pop up which is better left hidden! This article highlight some of the general technical approaches one can take, and in particular that of DNS filtering with a service such as OpenDNS, optionally using a Linux device to semi-automatically allocate filtering to some device but not others.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ipsidixit.net/2011/02/07/content-filtering-in-a-home-network/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Kindle-gouging</title>
		<link>http://www.ipsidixit.net/2010/10/07/kindle-gouging/</link>
		<comments>http://www.ipsidixit.net/2010/10/07/kindle-gouging/#comments</comments>
		<pubDate>Thu, 07 Oct 2010 13:06:01 +0000</pubDate>
		<dc:creator>sgroarke</dc:creator>
				<category><![CDATA[FPage]]></category>
		<category><![CDATA[amazon]]></category>
		<category><![CDATA[books]]></category>
		<category><![CDATA[consumer]]></category>
		<category><![CDATA[economics]]></category>
		<category><![CDATA[kindle]]></category>
		<category><![CDATA[technology]]></category>

		<guid isPermaLink="false">http://www.ipsidixit.net/?p=390</guid>
		<description><![CDATA[<p>Love technology toys? Check. Read a lot? Check. Often would read if had remembered or had space to bring book? Checkitycheck.</p> <p>I am absolutely in the prime target audience for a Kindle. Amazon having just launched their latest and greatest (by all accounts) Kindle 3, I was on the very brink of buying it. The [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.ipsidixit.net/wp-content/2010/10/kindle.png"><img class="alignleft size-full wp-image-396" style="margin-left: 25px; margin-right: 35px; margin-top: 15px; margin-bottom: 15px;" title="kindle" src="http://www.ipsidixit.net/wp-content/2010/10/kindle.png" alt="" width="135" height="139" /></a>Love technology toys? Check. Read a lot? Check. Often would read if had remembered or had space to bring book? Checkitycheck.</p>
<p>I am absolutely in the prime target audience for a Kindle. Amazon having just launched their latest and greatest (by all accounts) Kindle 3, I was on the very brink of buying it. The concept has me completely won over. Having many books available in a easy to read, use and carry form is just what I want. Here in France Amazon have not yet opened up a localised Kindle store, but the international version would suffice for now.</p>
<p>Before plonking down the cash, I look to see how much it would cost to buy the last few books I bought, plus a few others I already have but would like to have on the Kindle. Now I know that there is also quite a lot of free Kindle content available  - mainly out-of-copyright &#8220;classics&#8221; &#8211; that appeals greatly. But looking at the paid-for content, I was actually quite shocked at the prices. It&#8217;s going to be an imperfect comparison: the paper-version of a book has different attributes and drawbacks compared with the Kindle version. But ultimately the content is the key thing.</p>
<p>Shocked. I was shocked. Shocked was I. Was I shocked? Yes.</p>
<p><span id="more-390"></span></p>
<ul>
<li>Just yesterday I finished Stephen Fry&#8217;s <em>The Fry Chronicles.</em> I paid £9.50 (UK pounds) for it (I bought from Amazon UK, as was cheaper than the same book from Amazon France). Kindle version: $19.04. So Kindle about 30% more expensive.</li>
<li>Bill Bryson&#8217;s <em>A Short History of Nearly Everything</em>: Kindle $13.79. Hardcopy Amazon France: about $16.30 &#8211; so Kindle is cheaper.</li>
<li>Richard Dawkins&#8217; <em>The God Delusion</em>. Kindle store: $13.79. Hardcopy Amazon France: (equiv)$13.71  (So almost the same, but Kindle very slightly more)</li>
<li>Neil Gaiman&#8217;s <em>Anansi Boys</em> Kindle: $11.03. Hardcopy Amazon France: (equiv)$8.25</li>
<li>Levitt &amp; Dubner&#8217;s <em>Freakonomics</em> Kindle $13.79, Hardcopy Amazon France: (equiv)$7.66</li>
<li>Larry Wall&#8217;s Perl Bible <em>Programming Perl</em> (I&#8217;ve hard copy and would love a portable version!) Kindle: $36.42. Harcopy Amazon France: (equiv)$7.31 (yes, really)</li>
<li>Lord of the Rings. The Kindle shop has it at $18.88. Not so bad when the paper form requires (typically) 3 volumes (or at least that&#8217;s how I&#8217;ve got it) and costs, plus or minus, a similar amount.. Hmmm. I scroll down the page, looking at the reviews, wondering if they are Kindle-specific, to give me a feel for how these things come across. And there it is, <a href="http://www.amazon.com/Lord-Rings-ebook/dp/B002RI9176/ref=pd_sim_kinc_4?ie=UTF8&amp;m=AC2OY4L5JUE2O">Amazon&#8217;s Kindle Store top-placed review</a> for The Lord of the Rings. Let me quote the first part of it:</li>
</ul>
<blockquote>
<p style="padding-left: 60px;"><em>While the price of this book is steep, this is easily the best version of this book in existance. The gilded pages and high-quality leather look, smell and feel wonderful. This is not the questionable quality leather used on previous versions, this is the real deal. More importantly, this version has, as J.R.R. recorded in letters, reproductions of the Book of Marzubul. These are the pages from the Dwarven book found in the Mines of Moria by Gandalf and the Fellowship. In the begining and ending of the book are also included maps that fold out to render Middle-earth for the reader, again as the author originally wanted.</em></p>
</blockquote>
<p>Oh dearie me. There was me, teetering on the edge. Price premium for content? Yes, but maybe worth it&#8230; Maybe. Then the realisation that, unless I&#8217;m very much mistaken, the Kindle does not have affixed to it a little device which emits tiny wafts of leather scent when in use, nor the ability for its no doubt extraordinarily clever ePaper to transform itself into gilded pages.</p>
<p>Yes, I know it&#8217;s not what matters for 99% of the time when you read a book! And of course I realise that the benefits of a Kindle might outweigh, or at least balance, the benefits of paper. But I just found myself jolted out of my &#8220;I&#8217;m going to buy a Kindle!&#8221; trance by this review. And then found myself chuckling over the fact that it&#8217;s the top review of the book in the Kindle store itself.</p>
<p>Yet those selections above are not some carefully crafted list, selected to ensure an unfavourable comparison. Quite genuinely they are the first few items I thought to compare. Indeed in one case the Kindle version comes out (very slightly) cheaper. And also note that if I lived in the UK or US the prices of the hardcopy versions would typically be <em>even lower</em> &#8211; seeing as how Amazon France is not always cheapest for English books&#8230; In fact a quick check on <a href="http://www.bookdepository.co.uk/">The Book Despository</a> suggests that, with the exception of the Perl book, if I can tolerate the longer delivery times every one of those books can be delivered to me in France <em>even more</em> cheaply than Amazon France.</p>
<p>I have no doubt that, one day, the Kindle, or some descendent thereof, will be just what I want. But I&#8217;ve concluded that for now the price of the content is way too high. The consumer is being price-gouged, for a product which is interesting but not yet compelling. Today a book gets typeset, printed, bound, trimmed, trucked to the book store and stocked (or alternatively, stocked and then delivered by post), before one day being picked up by me. There&#8217;s a lot of financial overhead there. So someone tell me why for a electronic version, which loses almost all of that overhead, I must pay a <em>premium</em>? When new technology lowers costs, I expect to share in that cost saving, not be taken for a sucker.</p>
<p>Amazon will blame the publishers, the publishers will blame the authors and Amazon, and all parties will point fingers at each other while telling me &#8220;The artist deserves payment, y&#8217;know?&#8221; While entirely agreeing, I repeat: when technology lowers costs, I expect a share of it. And if you don&#8217;t offer me my share, you won&#8217;t get your share either.</p>
<p>When and if the price gouging stops, I&#8217;ll buy a Kindle. Not before.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ipsidixit.net/2010/10/07/kindle-gouging/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>In praise of VirtualBox</title>
		<link>http://www.ipsidixit.net/2010/07/06/in-praise-of-virtualbox/</link>
		<comments>http://www.ipsidixit.net/2010/07/06/in-praise-of-virtualbox/#comments</comments>
		<pubDate>Tue, 06 Jul 2010 06:52:35 +0000</pubDate>
		<dc:creator>sgroarke</dc:creator>
				<category><![CDATA[FPage]]></category>
		<category><![CDATA[digiblue]]></category>
		<category><![CDATA[qx5]]></category>
		<category><![CDATA[virtualbox]]></category>
		<category><![CDATA[vmware]]></category>
		<category><![CDATA[windows 7]]></category>
		<category><![CDATA[windows xp]]></category>
		<category><![CDATA[wine]]></category>

		<guid isPermaLink="false">http://www.ipsidixit.net/?p=359</guid>
		<description><![CDATA[<p>VirtualBox. What a splendid piece of software.</p> <p>Just a quick post to flag up this software, which deserves recognition. It&#8217;s a VMware lookalike, but entirely Free (as in beer and as in GNU GPL)</p> Digiblue boo <p>As owner of a Digital Blue QX5 microscope (one of the cheapest, greatest, &#8221;serious educational toys&#8221; you can lay [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.ipsidixit.net/wp-content/2010/07/vbox_logo2_gradient.png"><img class="alignleft size-full wp-image-361" style="margin-top: 10px; margin-bottom: 10px; margin-left: 15px; margin-right: 15px;" title="vbox_logo2_gradient" src="http://www.ipsidixit.net/wp-content/2010/07/vbox_logo2_gradient.png" alt="" width="140" height="180" /></a><a href="http://www.virtualbox.org/">VirtualBox</a>. What a splendid piece of software.</p>
<p>Just a quick post to flag up this software, which deserves recognition. It&#8217;s a <a href="http://www.vmware.com/">VMware</a> lookalike, but entirely Free (as in beer and as in <a href="http://en.wikipedia.org/wiki/GNU_General_Public_License">GNU GPL</a>)</p>
<h3>Digiblue boo</h3>
<p>As owner of a <a href="http://digiblue.com/customer-service/safety/digital_blue/qx5.html">Digital Blue QX5 microscope</a> (one of the cheapest, greatest,  &#8221;serious educational toys&#8221; you can lay your hands on &#8211; and it&#8217;s not even clear if they still make it) my daughter wanted to use it the other day. It&#8217;s been unused for a while and during that period my only Windows machine has moved to Windows 7 64-bit. And the QX5 driver software supplied is, of course, Windows XP 32-bit. Off to the Digiblue web-site and relieved to see that they assure me that they have Windows 7 64-bit drivers available. Turns out to be a big fat lie. They have them available for a slightly revised model of the QX5. Not the original (different USB ids, etc.)</p>
<h3>WINE?</h3>
<p>Thoughts turn to <a href="http://www.winehq.org/">Linux WINE</a>. Hmmmm. Nope. USB drivers and WINE are one area that still doesn&#8217;t really do what it needs to do.</p>
<h3>I need XP</h3>
<p>OK &#8211; I realise that to get the thing working I need a Windows XP machine. Simple. Yet I can&#8217;t be arsed to set up a dual-boot or anything like that. So remember how neat <a href="http://www.vmware.com/">VMware</a> was all those years ago when I used to use it. I even bought a license for some early version! But I don&#8217;t fancy buying a new license which would cost about €130.</p>
<p>I have the dimmiest recollection of some sort of freebie workstation VM called virtual-something. Google around a bit and quickly find <a href="http://www.virtualbox.org/">VirtualBox</a>. And it&#8217;s just like the VMware I remember, but without the credit card requirement.</p>
<p>Now I&#8217;ve only used it in the simplest of manners: running an XP 32-bit VM on a Windows 7 64-bit host. Not tried any other permutation of host/VM, of which there are all sorts claimed. (Linux hosts, MAC, different Windows &#8211; and even more VMs, extending to the BSD and so on) But for what I wanted it&#8217;s absolutely spot on. Really neat.</p>
<p>Oracle, not a company I&#8217;ve ever been a fanatical supporter of, earns a few brownie points from me.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ipsidixit.net/2010/07/06/in-praise-of-virtualbox/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>OpenVPN over IPv6</title>
		<link>http://www.ipsidixit.net/2010/06/21/openvpn-over-ipv6/</link>
		<comments>http://www.ipsidixit.net/2010/06/21/openvpn-over-ipv6/#comments</comments>
		<pubDate>Mon, 21 Jun 2010 12:38:09 +0000</pubDate>
		<dc:creator>sgroarke</dc:creator>
				<category><![CDATA[FPage]]></category>
		<category><![CDATA[ethernet]]></category>
		<category><![CDATA[firewall]]></category>
		<category><![CDATA[IPv6]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[openvpn]]></category>
		<category><![CDATA[ping6]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.ipsidixit.net/?p=313</guid>
		<description><![CDATA[<p>Previous articles have detailed various aspects of getting IPv6 running on a home-gateway router. The aim is to migrate as much as possible towards an IPv6-only situation.</p> <p>Here I cover the steps required to implement a simple point-to-point OpenVPN (SSL) VPN tunnel using PSK over IPv6 infrastructure.</p> <p>One key element for me is to migrate [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.ipsidixit.net/wp-content/2010/02/IPv6-logo.png"><img class="size-full wp-image-227 alignleft" style="margin-top: 10px; margin-bottom: 10px; margin-left: 15px; margin-right: 15px;" title="IPv6 Logo" src="http://www.ipsidixit.net/wp-content/2010/02/IPv6-logo.png" alt="" width="100" height="60" /></a>Previous articles have detailed various aspects of getting IPv6 running on a home-gateway router. The aim is to migrate as much as possible towards an IPv6-only situation.</p>
<p>Here I cover the steps required to implement a simple point-to-point OpenVPN (SSL) VPN tunnel using PSK over IPv6 infrastructure.</p>
<p>One key element for me is to migrate my VPN connection to a remote host I own off IPv4 and entirely onto IPv6. This was not entirely straightforward! In fact it took hours and hours of research and experimentation to get this working. The <em>eventual</em> config required is not so mind-boggling. But getting there was tricky. As I&#8217;ve found out so many times before with regard to IPv6, the building bricks are lying around, but there are very few sources of information to help you stack them up. Once the steps are laid out, as you&#8217;ll see below, it&#8217;s actually pretty easy.</p>
<h2>Migrating from <em>what</em> to OpenVPN IPv6?</h2>
<p>We&#8217;re going to migrate an IPv4 OpenVPN point-to-point PSK VPN tunnel on Linux to an equivalent on native IPv6 infrastructure. We&#8217;re not trying to have an IPv4 tunnel over IPv6, nor an IPv6 tunnel over IPv4 (both of which are possible and useful in different situations). Here I aim to have an IPv6 OpenVPN SSL tunnel over pure IPv6 infrastructure.</p>
<p>My current VPN set up is:</p>
<ul>
<li>Home gateway running Ubuntu 10.04 (Lucid)</li>
<li>Remote host running the same</li>
<li>Fixed public IPv4 and IPv6 (global) addresses on each.</li>
<li>OpenVPN point-to-point tunnel between them.</li>
<li>Simple PSK authentication.</li>
<li>Shorewall config as appropriate to OpenVPN.</li>
</ul>
<p>To put some detail on it, there is a standard build of OpenVPN installed, with a config file such as <em>/etc/openvpn/otherhost.conf</em>:</p>
<p><span id="more-313"></span></p>
<p><code> </code></p>
<p><code> </code></p>
<p><code> </code></p>
<p><code></p>
<div id="_mcePaste" style="padding-left: 30px;">remote <em>&lt;IPv4 address of the other host&gt;</em></div>
<div id="_mcePaste" style="padding-left: 30px;">dev tun</div>
<div id="_mcePaste" style="padding-left: 30px;">ifconfig 192.168.2.22 192.168.2.1</div>
<div id="_mcePaste" style="padding-left: 30px;">secret topsecret.psk</div>
<div id="_mcePaste" style="padding-left: 30px;">comp-lzo</div>
<div id="_mcePaste" style="padding-left: 30px;">keepalive 60 180</div>
<div id="_mcePaste" style="padding-left: 30px;">ping-timer-rem</div>
<div id="_mcePaste" style="padding-left: 30px;">persist-tun</div>
<div id="_mcePaste" style="padding-left: 30px;">persist-key</div>
<div id="_mcePaste" style="padding-left: 30px;">user nobody</div>
<div id="_mcePaste" style="padding-left: 30px;">group nogroup</div>
<div id="_mcePaste" style="padding-left: 30px;">daemon</div>
<p></code></p>
<p>At the other host we&#8217;ve a similar config, without the &#8220;remote &lt;address&gt;&#8221; part, and with the VPN addresses specified by the ifconfig flipped around.</p>
<p>This all works a treat. It&#8217;s about as plain an OpenVPN config as you could really get &#8211; a simple point to point tunnel using private IPv4 addressing.</p>
<h2>OpenVPN and IPv6</h2>
<p>This is really where things go all over the place. My starting point was <a href="http://openvpn.net/index.php/open-source/faq.html" target="_blank">over at the OpenVPN site</a>, looking for details on IPv6. I found that:</p>
<p><span style="font-family: Arial, Helvetica, sans-serif; line-height: normal; font-size: 12px; color: #003366;"> </span></p>
<blockquote>
<h2 style="font-size: 16px;">Is IPv6 support planned/in the works?</h2>
<p>Currently, there&#8217;s limited support for IPv6.</p>
<p>Point-to-point IPv6 tunnels are supported on OSes which have IPv6 TUN driver support (this includes Linux and the BSDs). IPv6 over TAP is always supported as is any other protocol which can run over Ethernet.</p>
<p>When OpenVPN 2.0 is run in server mode, IPv6 is currently only supported in TAP mode, not TUN mode (Server mode IPv6 TUN support will likely be added post-2.0).</p>
<p>The VPN carrier connection must currently use IPv4 endpoints, however there&#8217;s a patch which can be found in the openvpn-devel archives which adds IPv6 support. This patch will probably be merged into the mainline post-2.0.</p></blockquote>
<p><span style="font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; color: #000000; font-size: small;"><span style="line-height: 19px;">So just what do we conclude from that? It says that point-to-point works with the TUN driver. But I couldn&#8217;t find any useful information about <em>how</em> to set it up.</span></span></p>
<p><span style="font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; color: #000000; font-size: small;"><span style="line-height: 19px;">Researching further, I find that the version of OpenVPN we&#8217;re using with Ubuntu (which is the latest) has very limited IPv6 support indeed. Indeed somewhat less than the OpenVPN web-site led me to believe! Now it may well be that the problem is my inability to understand the nuances of what the OpenVPN folks are saying. But I sure couldn&#8217;t get it working with the installed, standard version.</span></span></p>
<p><span style="font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; color: #000000; font-size: small;"><span style="line-height: 19px;">So I then find a lot <a href="http://www.greenie.net/ipv6/openvpn.html" target="_blank">more information here</a>, which strongly suggests that I need to use a special IPv6 payload patch to achieve what I want to achieve. Specifically it says:</span></span></p>
<blockquote><p><span style="color: #000000; font-family: 'Times New Roman'; font-size: small;">in point-to-point TUN mode, OpenVPN can transport IPv6 packets with the &#8211;tun-ipv6 option. No support for configuring the IPv6 endpoints and routes from within OpenVPN either, you need to run external &#8220;up&#8221; scripts.</span></p></blockquote>
<p><span style="font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; color: #000000; font-size: small;"><span style="line-height: 19px;">That implies that I could use the unpatched OpenVPN and then manual scripts. As we&#8217;ll see below, in fact I had to use the patched version <em>and</em> external scripts! Again, likely due to a lack of knowledge on my part. But as a network engineer, I figure if I can&#8217;t work it all out then others will be in the same predicament.</span></span></p>
<h2>VPN addressing</h2>
<p>With IPv6, as discussed previously, the whole notion of private and public is done away with. Or at least, the meaning is seriously changed. Since we no longer have NAT in IPv6 (due to the address space being so very large) we do not have private address ranges for use inside a NATted network. So when choosing IPv6 addresses to use on our VPN it would seem that we can use any values. Well, yes and no. Back in IPv4 we could also have used any values too, while running the risk of accidentally using addresses which do really exist in the public Internet. So it is with IPv6, where we might collide with real addresses. It&#8217;s unlikely in these early days of IPv6, but we want to avoid it.</p>
<p>Another point to note, as with IPv4, is security. If VPN traffic inadvertently &#8221;leaks&#8221; out of a public interface (and this is easier to achieve than you might think, particularly when you are setting things up!) then it would be good to use addresses which any compliant adjacent router will simply drop as unroutable, rather than propagate them in to the wider world. Indeed this desire to avoid &#8220;leaks&#8221; is also a reason to not simply use a chunk of IPv6 addresses out of your allocated pool. It&#8217;s not as if they are scarce &#8211; but mixing VPN addresses and public addresses so intimately is just asking for trouble. In a perfect world, then fine. But I do not live in that world. So an arbitrary addressing barrier betwen my VPN and the Internet is no bad thing.</p>
<p>So for this IPv6 VPN, we shall use so-called Unique Local Addresses, (<a href="http://www.ipsidixit.net/2010/02/24/228/">Over here I touched upon</a> Link Local addresses which are, as the name suggests, valid only within a single network.) as per RFC 4193. The history of all this is damn messy, but the bottom line is you should choose addresses in the range fd00::/8. So I will, merrily ignoring all the rest of RFC 4193, with its try-and-make-it-random stuff, use the following:</p>
<ul>
<li>fd22::22 &#8211; the gateway device</li>
<li>fd22::1 &#8211; the remote host</li>
</ul>
<h2>What does good look like</h2>
<p>What&#8217;s our definition of a working IPv6 VPN? How will I know when &#8220;it&#8217;s working&#8221;? My criteria include:</p>
<ul>
<li>if I do an ifconfig I see a discrete VPN interface.</li>
<li>I can ping6 from one host to another.</li>
<li>during a ping6 I can tcpdump the tunnel interface and see clear traffic.</li>
<li>during a ping6 I can tcpdump the real WAN interface and see encrypted traffic.</li>
</ul>
<h2>Install a patched OpenVPN</h2>
<p>As mentioned in the introduction, I ended up using a patched OpenVPN. I still believe that, based upon what the OpenVPN website says that this should not be required! But I ended up doing it. If you trust the use of a pre-built binary (I did) then it&#8217;s actually pretty easy to install. Bearing in mind that the system being used are running Ubuntu Lucid, follow these steps and you should be good to go:</p>
<ul>
<li>Go to <a href="http://www.greenie.net/ipv6/openvpn.html">this page</a> and have a bit of a read.</li>
<li>Towards the bottom, you should find a link that takes you to <a href="https://launchpad.net/~berni/+archive/ipv6">this page</a>.</li>
<li>At the time of writing, this page only has builds for Intrepid and Karmic. And we&#8217;re Lucid. But fear not, and assume Karmic is correct&#8230;</li>
<li>As per the instructions, add the repository and signing key as per karmic.</li>
<li>Then perform the usual apt-get update followed either by a apt-get install openvpn or just a apt-get upgrade if openvpn was already installed.</li>
</ul>
<p>And you should be all set with the required version.</p>
<h2>Ancillary config</h2>
<p>I&#8217;m just going to cover the IPv6-specific OpenVPN config file. I&#8217;m not going to go in to every last detail required &#8220;around the edges&#8221;. Just a few reminders:</p>
<ul>
<li>You will point to your new IPv6 OpenVPN config from /etc/default/openvpn</li>
<li>You need to add the required config, just as for IPv4, to your shorewall6 config.</li>
</ul>
<h2>Core config</h2>
<p>Here we get to the details. The configs used will actually be very similar to the IPv4 versions, with obvious changes for IPv6.</p>
<p>I&#8217;ll say again: I simply do not understand why the config has to be this way. Based upon the documents and info above, I should be able to put this all neatly within the OpenVPN config. But I could not, and hence the configs below reference simple &#8216;helper&#8217; script to bring the tunnel up correctly.<br />
Here is the config for the home gateway device:</p>
<p style="padding-left: 30px;"><code> local local6address_as_per_hosts_file<br />
remote remote6address_as_per_hosts_file</code></p>
<p style="padding-left: 30px;"><code># Local and remote unique-local addresses<br />
ifconfig-ipv6   fd22::22 fd22::1<br />
# Allow external script to be run<br />
script-security 2<br />
# Script to do the rest of the work...<br />
up /etc/openvpn/helper.up</code></p>
<p style="padding-left: 30px;"><code>proto udp6<br />
dev tun<br />
tun-ipv6<br />
secret topsecret.psk<br />
comp-lzo<br />
keepalive 60 180<br />
ping-timer-rem<br />
persist-tun<br />
persist-key<br />
user root<br />
group root<br />
daemon<br />
</code></p>
<p>And here is the referenced helper script helper.up:</p>
<p style="padding-left: 30px;"><code> #!/bin/bash<br />
ip -6 link set tun0 up<br />
ip -6 addr add fd22::22 dev tun0<br />
ip -6 route add fd22::1 dev tun0<br />
</code></p>
<div>(And remember to make the script executable)</div>
<p>And here&#8217;s one for the remote server:</p>
<p style="padding-left: 30px;"><code> # Local and remote addresses<br />
ifconfig-ipv6 fd22::1 fd22::22</code></p>
<p style="padding-left: 30px;"><code># Allow external script to be run<br />
script-security 2<br />
# Script to do the rest of the work...<br />
up /etc/openvpn/helper.up<br />
proto udp6<br />
dev tun<br />
tun-ipv6<br />
secret supersecret.psk<br />
comp-lzo<br />
keepalive 60 180<br />
ping-timer-rem<br />
persist-tun<br />
persist-key<br />
user nobody<br />
group nogroup<br />
daemon</code></p>
<div>And the helper.up for that one is:</div>
<p style="padding-left: 30px;"><code> #!/bin/bash<br />
ip -6 link set tun0 up<br />
ip -6 addr add fd22::1 dev tun0<br />
ip -6 route add fd22::22 dev tun0<br />
</code></p>
<div>Again, make sure it&#8217;s executable.</div>
<p>Note that each makes use of names, where posible, rather than IPv6 addresses, which have been added to /etc/hosts to make everything easier to read and less prone to typos!</p>
<h2>Static addressing</h2>
<p>Yes, the addressing scheme is kinda static, I know. I wanted to keep this as simple as possible (which already isn&#8217;t so very simple&#8230;) and have everything point-to-point, with all routing being host-specific routing, rather than ranges. The obvious way to slightly adapt this is to allocate two IPv6 subnets within the unique-local adresses being used, and then of course adapt the helper scripts to add the route for the subnets rather than the specific hosts. I&#8217;m sure anyone who has got this far can make that change.</p>
<h2>Success!</h2>
<p>That&#8217;s about all that&#8217;s required. With the above config in place and the firewall set up correctly an ifconfig on the home router returns:</p>
<div style="padding-left: 30px;"><code>tun0    Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00</code></div>
<div style="padding-left: 90px;"><code>inet6 addr: fd22::22/128 Scope:Global<br />
UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1500  Metric:1<br />
RX packets:44 errors:0 dropped:0 overruns:0 frame:0<br />
TX packets:44 errors:0 dropped:0 overruns:0 carrier:0<br />
collisions:0 txqueuelen:100<br />
RX bytes:4576 (4.5 KB)  TX bytes:4576 (4.5 KB)</code></div>
<div></div>
<div>and the routing table shows two new entries:</div>
<p><code></p>
<div style="padding-left: 30px;">fd22::1 dev tun0  metric 1024  mtu 1500 advmss 1440 hoplimit 0</div>
<div style="padding-left: 30px;">fd22::22 dev tun0  proto kernel  metric 256  mtu 1500 advmss 1440 hoplimit 0</div>
<p></code></p>
<div>And if I ping6 the other VPN address I get a response! Checking with tcpdump directly on the virtual tun0 interface I see meaningful ping-like traffic. While a similar scoping of the bearer interface, eth0, shows me the expected random-looking traffic (i.e. my highly sophisticated test for &#8220;Yes, it&#8217;s encrypted&#8221;!)</div>
]]></content:encoded>
			<wfw:commentRss>http://www.ipsidixit.net/2010/06/21/openvpn-over-ipv6/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Netgear EVA9150</title>
		<link>http://www.ipsidixit.net/2010/06/10/netgear-eva9150/</link>
		<comments>http://www.ipsidixit.net/2010/06/10/netgear-eva9150/#comments</comments>
		<pubDate>Thu, 10 Jun 2010 12:15:36 +0000</pubDate>
		<dc:creator>sgroarke</dc:creator>
				<category><![CDATA[FPage]]></category>
		<category><![CDATA[ethernet]]></category>
		<category><![CDATA[eva9150]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[media]]></category>
		<category><![CDATA[mkv]]></category>
		<category><![CDATA[netgear]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[review]]></category>
		<category><![CDATA[television]]></category>
		<category><![CDATA[test]]></category>
		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://www.ipsidixit.net/?p=294</guid>
		<description><![CDATA[<p>My much-loved Pinnacle Showcenter (written about previously here, for example) finally packed up. Not sure what killed it &#8211; did the obligatory open-it-up-and-buzz-it-a-bit routine. PSU seemed OK, but when the main board was connected up, something was dragging the PSU down big-time. No obviously failed components, so you are left with the likelihood that some [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.ipsidixit.net/wp-content/2010/06/eva9150.jpg"><img class="size-medium wp-image-293 alignleft" title="eva9150" src="http://www.ipsidixit.net/wp-content/2010/06/eva9150-300x128.jpg" alt="" /></a>My much-loved Pinnacle Showcenter (written about previously <a href="http://www.ipsidixit.net/2007/10/19/pinnacle-showcenter-1000/">here</a>, for example)  finally packed up. Not sure what killed it &#8211; did the obligatory open-it-up-and-buzz-it-a-bit routine. PSU  seemed OK, but when the main board was connected up, something was dragging the PSU down big-time. No obviously failed components, so you are left with the likelihood that some chip somewhere has gone bad in a big way. So after shedding a tear, one quickly cheers up and realises that it&#8217;s a perfect excuse to replace it with something new!</p>
<h2>Not self-build?</h2>
<p>I wanted a device with similar functionality, to play my large collection of videos stored on a server and also allow occasional photo browsing. I didn&#8217;t have many hard and fast requirements, but as far as they went they were:</p>
<ul>
<li>support a wide range of media formats, particularly DivX variants and MKV hi-def.</li>
<li>support a wide range of output (today we still have a large but rather old normal-def TV &#8211; I am sure in the lifetime of a new device our TV will get replaced with something HDMI-ish)</li>
<li>smart networking: my house is a mixture of Ethernet-over-power and wi-fi, with little cabled Ethernet)</li>
<li>Open. Very important. No proprietary crap, either in terms of what it can play or what I am allowed to do with it.</li>
</ul>
<p>Given this and my propensity for building my own kit, a self-build seemed like an obvious idea. I toyed with the obvious mini-ITX options, with appropriately funky video cards and one of the Linux TV-based distros. But when I did a rough calculation of both the cost and the work required I couldn&#8217;t help but check if there was anything ready-built which would also do the job. I didn&#8217;t expect to find anything, to be honest. It was almost a &#8220;Due Diligence&#8221; exercise which I had to perform so that when I then spent day after day getting my self-build working OK I could mentally justify the effort. However the formality of proving there was nothing which met my needs turned out to have a surprise ending.<span id="more-294"></span></p>
<h2>Netgear EVA9150</h2>
<p>To cut a long story short, I came across the <a href="http://www.netgear.com/Products/Entertainment/DigitalMediaPlayers/EVA9150.aspx">Netgear EVA 9150</a>. Lovely device. Absolutely spot on. And no, I have no affiliation with Netgear! I paid € 270 of my hard-earned cash for it. I&#8217;ll not run through the spec (you can get that <a href="http://www.netgear.com/Products/Entertainment/DigitalMediaPlayers/EVA9150.aspx?detail=Specifications">here</a>) but will mention some key features it has which make it rather special and ideal for my requirements.</p>
<h3>Server support</h3>
<p>Go back to the recent past and devices such as the Pinnacle Showcenter used a web-based client-server architecture. The mediaplayer was, for many purposes, a web-client. It obtained metadata, menus, etc. from the server which had to run either proprietary software or, thanks to some open-source projects, a web server. Either way, you had to run &#8220;special&#8221; software on the media server. Then, to actually play something, the mediaplayer would initiate a web-streaming transfer of the data. Given the limited buffering capability available this meant that the server <em>and</em> network had to, more or less, deliver the required bit-rate in real-time. Any variations (due to a server hit or a network glitch) would result in degraded or completely stopped video playback.</p>
<p>The EVA9150, as I gather with many of the newer generation of mediaplayers, has a quite different architecture. They are actually simpler. The player itself is now much smarter and so demands correspondingly less smarts of the server. All the server has to be is what it already is: a network file server. The mediaplayer runs a local operating system (Linux in the case of the EVA9150) and just scans the server and, when required, copies stuff across. See below where I talk about caching for what this means in practice&#8230;</p>
<p>The version of firmware that came installed on my EVA9150 only supported Samba (i.e. Windows) shared file systems from the server. However the EVA9150 software seems to be under pretty active development, and a newer version (easy install: USB key in the front panel) now provides NFS support too. Since I run a Linux-based file server, this is great.</p>
<h3>Networking</h3>
<p>It has the almost obligatory 10/100 wired Ethernet port. I&#8217;m currently using that into a Ethernet-over-power adapter. The box also has built-in (and it really is built-in: the antennae are completely hidden inside the casing) 802.11a/b/g/n. That last one is interesting: nominal 300Mbps, 5GHz band, wi-fi. I&#8217;ve not tested it yet, but it could be useful in the future.</p>
<h3>Caching</h3>
<p>Ahhhh. This is, for me anyway, the killer feature. My home network works OK most of the time. Like most home networks, it will occasionally hiccup. And during a 2 hour movie even the occasional hiccup or two can become madly apparent when one is streaming in near-real time. Here the EVA9150 does something so simple. It&#8217;s not <em>at all</em> unique, it&#8217;s just done so well and transparently. It caches to the local 500GB disk. So you start a 2 hour movie and, probably within a few minutes of the start, it&#8217;s cached the whole thing successfully to the local disk. Network glitches be dammed. Simple. Perfect. Me like.</p>
<h3>Media formats supported</h3>
<p>The independent reviews of the EVA9150 make this point pretty strongly: try and find something, anything, it can&#8217;t play. OK, I best they exist. But it does everything I&#8217;ve chucked at it. I&#8217;ve got the output connected to a low-def standard TV. I start playing a hi-def Matroska file. Apart from the fact that is support MKV in the first place, I don&#8217;t get any crap about &#8220;this is hi-def, the output is not&#8221; etc. It just PLAYS IT, and down-specs (or, apparently, up-specs under other conditions) as required.</p>
<h3>Physical support</h3>
<p>There&#8217;s a plug on the back for anything I&#8217;ve ever heard about. From SCART up to HDMI, with loads in between.</p>
<h3>Value for money?</h3>
<p>All in all, it&#8217;s a very good mediaplayer. Not cheap, but if I&#8217;d built a box with the same spec myself, quite apart from my time, I don&#8217;t think the parts would have come to less than the €270 I paid anyway.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ipsidixit.net/2010/06/10/netgear-eva9150/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

