<?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>bits &#124; andy smith&#039;s blog</title>
	<atom:link href="http://andys.org.uk/bits/feed/" rel="self" type="application/rss+xml" />
	<link>http://andys.org.uk/bits</link>
	<description>random stuff from the mind of a twenty-something professional geek</description>
	<lastBuildDate>Wed, 14 Jul 2010 10:34:20 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>hamtests.co.uk</title>
		<link>http://andys.org.uk/bits/2010/07/14/hamtests-co-uk/</link>
		<comments>http://andys.org.uk/bits/2010/07/14/hamtests-co-uk/#comments</comments>
		<pubDate>Wed, 14 Jul 2010 10:34:20 +0000</pubDate>
		<dc:creator>Andy Smith</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[amateur radio]]></category>
		<category><![CDATA[ham radio]]></category>

		<guid isPermaLink="false">http://andys.org.uk/bits/?p=109</guid>
		<description><![CDATA[<p>Just a short one &#8211; and the first post in a while &#8211; but I&#8217;ve come across www.hamtests.co.uk, which contains a guide to the syllabus for the exam for the Foundation license &#8211; as well as mock tests for the exam itself &#8211; which I&#8217;m hoping to do in the coming weeks. The site&#8217;s not [...]]]></description>
			<content:encoded><![CDATA[<p>Just a short one &#8211; and the first post in a while &#8211; but I&#8217;ve come across <a href="http://www.hamtests.co.uk/">www.hamtests.co.uk</a>, which contains a guide to the syllabus for the exam for the Foundation license &#8211; as well as mock tests for the exam itself &#8211; which I&#8217;m hoping to do in the coming weeks. The site&#8217;s not quite finished &#8211; there&#8217;s some stuff missing for the Intermediate level, but it&#8217;s a really useful site.</p>
]]></content:encoded>
			<wfw:commentRss>http://andys.org.uk/bits/2010/07/14/hamtests-co-uk/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A whole lot of nothing</title>
		<link>http://andys.org.uk/bits/2010/04/20/a-whole-lot-of-nothing/</link>
		<comments>http://andys.org.uk/bits/2010/04/20/a-whole-lot-of-nothing/#comments</comments>
		<pubDate>Tue, 20 Apr 2010 16:09:58 +0000</pubDate>
		<dc:creator>Andy Smith</dc:creator>
				<category><![CDATA[Doncaster]]></category>
		<category><![CDATA[Politics]]></category>
		<category><![CDATA[doncaster metropolitan borough council]]></category>
		<category><![CDATA[peter davies]]></category>

		<guid isPermaLink="false">http://andys.org.uk/bits/?p=103</guid>
		<description><![CDATA[<p>Another repost, this time from last year when Peter Davies was elected Mayor of Doncaster. I&#8217;ve noticed this is being linked to a lot, so here it is</p>
<p>(Update (12.06.2009): I&#8217;ve had an email from Toby Foster&#8217;s brother, who&#8217;s pointed out that where I originally transcripted Toby as saying &#8220;About right&#8221;, he actually says &#8220;Well that&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p><em>Another repost, this time from last year when Peter Davies was elected Mayor of Doncaster. I&#8217;ve noticed this is being linked to a lot, so here it is</em></p>
<p>(<strong>Update (12.06.2009)</strong>: I&#8217;ve had an email from Toby Foster&#8217;s brother, who&#8217;s pointed out that where I originally transcripted Toby as saying &#8220;About right&#8221;, he actually says &#8220;Well that&#8217;s bright&#8221;. I&#8217;ve updated the transcript to that effect)</p>
<p>Today is Doncaster&#8217;s <a href="http://www.doncasterfreepress.co.uk/15745/Peter-Davies-is-Doncasters-new.5334454.jp">brand-spanking-new Mayor</a>&#8216;s first day on the job, and his first engagement of the day was an interview with <a href="http://www.bbc.co.uk/southyorkshire/radio_sheffield/index.shtml">BBC Radio Sheffield</a>&#8216;s <a href="http://www.bbc.co.uk/southyorkshire/content/articles/2006/01/20/radio_sheffield_toby_foster_profile.shtml">Toby Foster</a>. I hope Mayor Davies didn&#8217;t think he was in for an easy ride for his first official interview, because that&#8217;s not what he got.</p>
<p>Over the course of seven and a half minutes, Toby Foster took Mr Davies&#8217; election manifesto and pulled it apart, pointing out that he doesn&#8217;t know what &#8216;PC jobs&#8217; there are in the council (Mr Davies&#8217; reply being &#8220;the things that are usually advertised in the [...] Guardian&#8221;), that he can&#8217;t cut translation services for non-English speakers (Toby Foster: &#8220;It&#8217;s more than likely illegal, isn&#8217;t it?&#8221;. Peter Davies: &#8220;I dunno&#8221;), and that he hasn&#8217;t even though of the possible benefits of funding minority events such as the Gay Pride march (when asked how much money went to funding it, he replies &#8220;Haven&#8217;t got a clue, I haven&#8217;t looked into&#8230; I haven&#8217;t got the details&#8221;). On top of this, he admits that his cuts will mean job losses &#8211; which I&#8217;m sure the electorate of Doncaster will be happy to hear.</p>
<p><a href="http://www.bbc.co.uk/iplayer/episode/p003994x/The_Toby_Foster_Bigger_at_Breakfast_Show_08_06_2009/">Click here</a> for BBC&#8217;s Listen Again (at about the 1hr 57min mark), or <a href="/media/peter_davies_toby_foster_bbc_radio_sheffield_08_06_2009.mp3">here</a> for just the interview (which I hope the BBC won&#8217;t mind me putting here). For those who can&#8217;t listen to the interview, I&#8217;ve transcribed the whole thing below.</p>
<p><span id="more-103"></span></p>
<p><em>(from BBC Radio Sheffield, 8th June 2009)</em></p>
<p><strong>Toby Foster (BBC Radio Sheffield):</strong> Thanks very much for joining us. I said that we didn&#8217;t see it coming &#8211; did you see it coming? Did you expect to win?</p>
<p><strong>Peter Davies:</strong> Well, well not really. A great friend of mine told me the night before I was going to get a great shock, and that I would win. I was thinking of saving the deposit at the time.</p>
<p><strong>TF:</strong> I can imagine. What was it you think that made people vote for you?</p>
<p><strong>PD:</strong> Well we were the only party who gave a distinctive agenda to the electorate. All the others talked waffle. I looked at all the leaflets, I couldn&#8217;t make anything of them all, they were all the same.</p>
<p><strong>TF:</strong> You did give a distinctive agenda, you&#8217;re absolutely right, you made some real points on that. Let&#8217;s just have a look &#8211; let&#8217;s have a look at them shall we? The first one of course I think&#8217;s an easy one &#8211; you&#8217;re going to cut the mayor&#8217;s salary.</p>
<p><strong>PD:</strong> That&#8217;s the first thing this morning</p>
<p><strong>TF:</strong> Down to £30,000 a year. Now, some people could look at that Peter and say, well, you get more than that for running a supermarket these days. Surely a council deserves&#8230; a bit more respect?</p>
<p><strong>PD:</strong> No, the council deserves somebody who&#8217;s going to run it properly, and it deserves somebody who&#8217;s prepared to give their services partly free, in a sense &#8211; at one time all local government councillors did all the free, er, it&#8217;s become a gravy train and I&#8217;m not prepared to be part of that.</p>
<p><strong>TF:</strong> So what about the people who work for you? The deputy mayor, other people in the departments &#8211; are you cutting their wages as well?</p>
<p><strong>PD:</strong> Er, well, I&#8217;ve discussed that with-, well not- not the people in the departments, I can&#8217;t- I&#8217;ve no control over what they&#8217;ve been given, but the deputy mayor and the rest of the cabinet will discuss that at, at the earliest opportunity.</p>
<p><strong>TF:</strong> Well, you say you&#8217;ve no control over people in the departments, one of the big things on your campaign was that you&#8217;re going to cut &#8216;PC jobs&#8217;.</p>
<p><strong>PD:</strong> Oh yeah, that&#8217;s a different thing altogether, er-</p>
<p><strong>TF:</strong> Which jobs are those?</p>
<p><strong>PD:</strong> Well, er, I&#8217;m going to look into that. Things like Diversity Officers, er, the things that are usually advertised in the Manchester-, well, it&#8217;s not the Manchester Guardian now &#8211; in the Guardian&#8230;</p>
<p><strong>TF:</strong> Right, so have-, so, so hang on, so so there are politically&#8230;</p>
<p><strong>PD:</strong> I mean, I can&#8217;t give you a full list at the moment, but I will&#8230;</p>
<p><strong>TF:</strong> But that&#8217;s what you put on your manifesto &#8211; you must have had an idea on your manifesto what you were talking about?</p>
<p><strong>PD:</strong> Yeah, yeah, all these people who are, sort of, controlling thought processes and this sort of thing, and er, erm&#8230; every department is riddled with this sort of nonsense these days.</p>
<p><strong>TF:</strong> So currently then, this morning, Doncaster Council is riddled with people who are, who are doing this kind of nonsense, ah&#8230; and they&#8217;re on notice, are they? People are going to lose their jobs?</p>
<p><strong>PD:</strong> Er, very likely.</p>
<p><strong>TF:</strong> But we don&#8217;t know who they are, yeah? But certainly Diversity Officers&#8230;</p>
<p><strong>PD:</strong> Obviously I&#8230; I&#8217;m&#8230; well, that sort of thing, yes.</p>
<p><strong>TF:</strong> So, the Diversity Officer who&#8217;s getting ready for work this morning at Doncaster might as well not bother?</p>
<p><strong>PD:</strong> Well, he&#8217;s&#8230; he&#8217;s in employment at the moment&#8230;</p>
<p><strong>TF:</strong> But he won&#8217;t be for long?</p>
<p><strong>PD:</strong> &#8230;I think, I think we ought to be talking about what we&#8217;re going to do sort of, er, now and, er, what I&#8217;ve discovered &#8211; that might be a more fruitful discussion.</p>
<p><strong>TF:</strong> Well, I mean&#8230; these are the reasons people voted for you. Very bold points, as you said. Er, you&#8217;re going to cut translation services for non-English speakers &#8211; that&#8217;s a very bold point. It&#8217;s more than likely illegal, isn&#8217;t it?</p>
<p><strong>PD:</strong> I dunno&#8230; again, I&#8217;ve got to find this out. It&#8217;s-</p>
<p><strong>TF:</strong> Well it is &#8211; let me tell you it is, under the European Court of Human Rights it&#8217;s illegal.</p>
<p><strong>PD:</strong> -Well, well, well let&#8230; we&#8217;ll look into this &#8211; we&#8217;re getting council&#8217;s opinion on what I can do and what I can&#8217;t do, and that&#8217;s&#8230;</p>
<p><strong>TF:</strong> No, no, you said in your manifesto you would definitely do it.</p>
<p><strong>PD:</strong> Yeah, well, I&#8230; well, I, er, if, if somebody comes in the way and stops me doing these things, then that is an insult to democracy.</p>
<p><strong>TF:</strong> So what was the point of your manifesto? You might as well have said you were going to fly to the moon if you&#8217;re just going to say now that you can&#8217;t do it.</p>
<p><strong>PD:</strong> No, look&#8230; I&#8217;m going to do my best to do it. If I can&#8217;t, I shall tell the electorate why I&#8217;ve not been able to do it, and who&#8217;s stood in the way of it. The-</p>
<p><strong>TF:</strong> Well, the law&#8217;s standing in the way of it.</p>
<p><strong>PD:</strong> -Just a minute, just a minute. The electorate clearly want me to do that. The law needs changing, then, doesn&#8217;t it?</p>
<p><strong>TF:</strong> Well, you say the law needs changing-</p>
<p><strong>PD:</strong> If we get a new government, then we might get rid of some of this ludicrous legislation, and be able to run our own country again.</p>
<p><strong>TF:</strong> Okay, now you&#8217;re going to cut the number of councillors from 60 to 20.</p>
<p><strong>PD:</strong> That is another difficulty, and the first-</p>
<p><strong>TF:</strong> Can&#8217;t do it, can you?</p>
<p><strong>PD:</strong> Er, well, we can appeal to their moral consciences-</p>
<p><strong>TF:</strong> So you can&#8217;t do it, can you?</p>
<p><strong>PD:</strong> Look, you keep telling me what I can&#8217;t do. I&#8217;ll find out what I can&#8217;t do, and if I can&#8217;t do-</p>
<p><strong>TF:</strong> You are finding out now, I&#8217;m telling you, Peter, you can&#8217;t do it. You&#8217;d have thought you&#8217;d have thought of this before you started.</p>
<p><strong>PD:</strong> This is quite a pointless discussion. Completely pointless.</p>
<p><strong>TF:</strong> Why?</p>
<p><strong>PD:</strong> Well &#8211; I&#8217;m sitting here telling you what I want to do, you&#8217;re telling me I can&#8217;t do it. I&#8217;ll find out &#8211; not from you, from other people &#8211; if I can do it or not.</p>
<p><strong>TF:</strong> Why didn&#8217;t you look at to see-</p>
<p><strong>PD:</strong> That&#8217;s where we go. And then we tell the electorate what&#8217;s going on.</p>
<p><strong>TF:</strong> Why didn&#8217;t you look to see if you could do it before you asked people to vote on it?</p>
<p><strong>PD:</strong> Because people want this to happen. And it&#8217;s time we-</p>
<p><strong>TF:</strong> We all want free speech, Peter, but why didn&#8217;t you look into it to see if it could happen before you asked 14,000 people to vote on it? You know what&#8217;s going to happen &#8211; they got upset with the political processes in Doncaster before, they disliked Martin Winter. You&#8217;ve come along, you&#8217;ve waved this flag, knowing you can&#8217;t back any of it up and they&#8217;ve voted for you. How are they going to feel when they realise they&#8217;ve been hoodwinked?</p>
<p><strong>PD:</strong> They&#8217;ve not been hoodwinked, I&#8217;m a man of my word, and I shall do everything that I can to put this into practice. And that is something that Doncaster&#8217;s not had before.</p>
<p><strong>TF:</strong> You&#8217;re going to cut the Gay Pride funding.</p>
<p><strong>PD:</strong> Yep.</p>
<p><strong>TF:</strong> Erm, how much did Doncaster Council fund Gay Pride?</p>
<p><strong>PD:</strong> Haven&#8217;t got a clue, I haven&#8217;t looked into&#8230; I haven&#8217;t got the details, I&#8230; I haven&#8217;t even started-</p>
<p><strong>TF:</strong> Well that&#8217;s bright, isn&#8217;t it? So how much did&#8230; how much was it worth to Doncaster?</p>
<p><strong>PD:</strong> How&#8230;er, what?</p>
<p><strong>TF:</strong> The Gay Pride march. 8,000 people in town for a day.</p>
<p><strong>PD:</strong> I don&#8217;t know. They can still come. There&#8217;s nobody stopping them coming.</p>
<p><strong>TF:</strong> So you don&#8217;t know what it costs, you don&#8217;t know what it earns, but you&#8217;re banning it?</p>
<p><strong>PD:</strong> I&#8217;m saying that&#8230; hard-pressed taxpayers money should not be spent on promoting any type of sexuality whether it&#8217;s straight or gay.</p>
<p><strong>TF:</strong> But for all you-, but for all you know it could be making a fortune for the town &#8211; you don&#8217;t know, you&#8217;ve not even looked at it.</p>
<p><strong>PD:</strong> Well, it, er&#8230; it may, it may or it may not, I&#8217;m telling you what I&#8217;m not doing, and again it was on the manifesto, it was quite clear people appeared to like what I was saying.</p>
<p><strong>TF:</strong> Yeah, but the stuff on the manifesto we&#8217;ve already realised &#8211; you can&#8217;t do anything about it.</p>
<p><strong>PD:</strong> I think it&#8217;s time we finished this interview, it&#8217;s quite pointless. I&#8217;ve&#8230; I&#8230; It&#8217;s really wasted&#8230; I wanted to say a few things this morning that might have been-</p>
<p><strong>TF:</strong> Tell me what you want to say.</p>
<p><strong>PD:</strong> &#8230;that people might have wanted to listen to.</p>
<p><strong>TF:</strong> Tell me what you want to say.</p>
<p><strong>PD:</strong> Well, I wanted to point out that this morning I was going to, er, see that two social workers were returned to the childrens hospital, er, which were taken away some time ago for some unaccountable reason. I was going to say we&#8217;re getting rid of Doncaster News at the earliest opportunity, and I also wanted to point out that this very weekend I&#8217;ve discovered that Doncaster is twinned with nine separate towns, er, that the Mayor&#8230; the ex-Mayor had a car, for what reason I don&#8217;t know. It&#8217;s quite reasonable that the Civic Mayor has a car, but why the elected Mayor has one, God only knows, er, and it looks to me like a Daily Telegraph moment, where I shall be discovering things every day that, er, can be got rid of.</p>
<p><strong>TF:</strong> Okay&#8230; none of that really means anything, does it? Let&#8217;s have a look at Doncaster News. You&#8217;re getting rid of Doncaster News, that&#8217;s a, er, flyer&#8230; er, paper that goes to every home in the borough isn&#8217;t it, to tell them what you&#8217;re doing?</p>
<p><strong>PD:</strong> Well, it was to distort&#8230; er, what Mayor Winter was doing, yes.</p>
<p><strong>TF:</strong> So now you&#8217;re stopping communication with the people of Doncaster?</p>
<p><strong>PD:</strong> No &#8211; communication will be through the Doncaster Free Press, though Radio Sheffield if we can get some sensible interviews-</p>
<p><strong>TF:</strong> Heh.</p>
<p><strong>PD:</strong> -and, er, the free newspapers.</p>
<p><strong>TF:</strong> So the people who work on Doncaster News, then, are they out of work as well?</p>
<p><strong>PD:</strong> I don&#8217;t know, I don&#8217;t&#8230; I, I, don&#8217;t know what their full&#8230; I&#8217;ve&#8230; I&#8230; I&#8217;ve not even got&#8230; been in the office yet, I&#8217;ve&#8230; I&#8217;ve not even-</p>
<p><strong>TF:</strong> This is the problem, isn&#8217;t it-</p>
<p><strong>PD:</strong> -had the briefing from the Chief Executive-</p>
<p><strong>TF:</strong> You actually don&#8217;t understand the laws, you don&#8217;t understand-</p>
<p><strong>PD:</strong> Okay, I&#8217;m stopping this interview, it&#8217;s a complete waste of time, er, you&#8217;re not asking any sensible questions, and er, I really don&#8217;t want to continue.</p>
<p><strong>TF:</strong> Peter, all I&#8217;m asking is how you&#8217;re going to deliver on your election manifesto?</p>
<p><em>&gt;Silence&lt;</em></p>
<p><strong>TF:</strong> Well, I can assure you, that&#8217;s going to be one of the easiest he gets.</p>
]]></content:encoded>
			<wfw:commentRss>http://andys.org.uk/bits/2010/04/20/a-whole-lot-of-nothing/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Up the proverbial creek, minus the paddle</title>
		<link>http://andys.org.uk/bits/2010/04/20/up-the-proverbial-creek-minus-the-paddle/</link>
		<comments>http://andys.org.uk/bits/2010/04/20/up-the-proverbial-creek-minus-the-paddle/#comments</comments>
		<pubDate>Tue, 20 Apr 2010 01:46:44 +0000</pubDate>
		<dc:creator>Andy Smith</dc:creator>
				<category><![CDATA[Doncaster]]></category>
		<category><![CDATA[Politics]]></category>
		<category><![CDATA[audit commission]]></category>
		<category><![CDATA[doncaster metropolitan borough council]]></category>

		<guid isPermaLink="false">http://andys.org.uk/bits/?p=89</guid>
		<description><![CDATA[<p>Doncaster is my home town, and it&#8217;s also where I&#8217;ve lived for all of my (almost) 28 years since I popped (!) into being at Doncaster Royal Infirmary in the summer of 1982. For those unfamiliar with geography in the north of England, Doncaster&#8217;s a fairly large town (with a population just under 300,000) in [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://en.wikipedia.org/wiki/Doncaster">Doncaster</a> is my home town, and it&#8217;s also where I&#8217;ve lived for all of my (almost) 28 years since I popped (!) into being at <a href="http://www.dbh.nhs.uk/about_us/hospitals/doncaster_royal_infirmary/default.asp">Doncaster Royal Infirmary</a> in the summer of 1982. For those unfamiliar with geography in the north of England, Doncaster&#8217;s a fairly large town (with a population just under 300,000) in <a href="http://en.wikipedia.org/wiki/South_Yorkshire">South Yorkshire</a>. It&#8217;s also the source of many a political furore at a local government level, and has been since the Donnygate scandal of the mid-to-late 1990s.</p>
<p>The fun never stops in Doncaster, and today is no different &#8211; the Audit Commission has <a href="http://www.audit-commission.gov.uk/localgov/audit/inspection/reports/Pages/201004doncastermetropolitanboroughcouncilcorporategovernanceinspection.aspx">published the results of their snap Corporate Governance Inspection</a>, carried out over the first few months of this year. It&#8217;s a frank assessment of the state of <a href="http://en.wikipedia.org/wiki/Metropolitan_Borough_of_Doncaster">Doncaster Metropolitan Borough Council</a>, and it&#8217;s not pretty.</p>
<p><span id="more-89"></span>Following well-publicised failings in the borough&#8217;s Children&#8217;s Services department, a complete lack of improvement in other areas and a history of poor governance &#8211; amongst other things &#8211; the Audit Commission made the decision to begin a Corporate Governance Inspection. This looks at how the Council is run, how the elected members (i.e., the mayor and the councillors) work and how the Council is providing services to the people of Doncaster. <a href="http://www.doncaster.gov.uk/enewsdoc/Doncaster_CGI_final.pdf">The report itself</a> <i>(warning: PDF)</i> runs to around 40 pages, so I won&#8217;t go into detail, but here&#8217;s a summary:-</p>
<ul>
<li>Almost <strong>nobody</strong> escapes blame</li>
<li>The Mayor &#8211; <strong>Peter Davies</strong> &#8211; is criticised, along with his cabinet, for <strong>not providing the leadership required of his office</strong></li>
<li>The <strong>rest of the councillors</strong> are taken to task for seeking to <strong>obstruct the Mayor and his cabinet from implementing their policies</strong></li>
<li>Some <strong>chief officers</strong> (i.e. paid, non-elected, non-political senior staff) are <strong>unable to effectively work together</strong></li>
</ul>
<p>There are a number of themes throughout the report, but the main one is that the Mayor and the remainder of the Council are constantly at loggerheads with each other, with some <strong>senior, long-standing elected members actively putting personal political ambitions before that of the people of Doncaster</strong> &#8211; the very people who elected them.</p>
<p>I&#8217;m personally no fan of Peter Davies &#8211; I don&#8217;t like him and that&#8217;s probably an understatement. Being a left-wing type, I disagree with virtually all of his policies and opinions, but in this case he doesn&#8217;t deserve most of the blame, despite even the report noting that his style and attitude do nothing to help matters. It&#8217;s the actions of a number of the councillors that are the crux of the problem, and the report suggests that although the majority of them are Labour councillors, it&#8217;s by no means limited to them.</p>
<p>So what next? Well, the Audit Commission <a href="http://www.localgov.co.uk/index.cfm?method=news.detail&#038;id=88147">has recommended</a> that John Denham, the Communities Secretary, use the powers given to him by <a href="http://www.opsi.gov.uk/acts/acts1999/ukpga_19990027_en_2#pt1-pb4-l1g15 ">Section 15 of the Local Government Act 1999</a> &#8211; a recommendation that within minutes of the report&#8217;s publication he said he would be taking. This means that he could order the establishment of an &#8216;Improvement Board&#8217; to drive improvements within the council, or put in measures to ensure the mayor and the councillors behave in a proper manner. This sounds a bit toothless, so the best bit is this: <strong>He can suspend some or all of the functions of the Executive and the Council, replacing them with commissioners appointed to carry out the suspended functions</strong>. That means (albeit temporarily) <strong>no mayor, no cabinet, and in theory no councillors</strong>.</p>
<p>Interestingly &#8211; although not surprising &#8211; just <em>22%</em> of people in the recent Place Survey believed they could influence the decisions of Doncaster Metropolitan Borough Council. It&#8217;s obvious that the elected members have lost the faith of the electorate &#8211; if indeed they had it to start with. With the impending General Election, the people of Doncaster will also be voting for a candidate for their council ward, which means that 33% of the Council is up for re-election. In my opinion, to show that they understand how they&#8217;ve utterly failed the people of Doncaster, <strong>they should all step down immediately and let the people make the choices they deserve</strong>.</p>
]]></content:encoded>
			<wfw:commentRss>http://andys.org.uk/bits/2010/04/20/up-the-proverbial-creek-minus-the-paddle/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PXE booting a Debian Squeeze install</title>
		<link>http://andys.org.uk/bits/2010/03/22/pxe-booting-a-debian-squeeze-install/</link>
		<comments>http://andys.org.uk/bits/2010/03/22/pxe-booting-a-debian-squeeze-install/#comments</comments>
		<pubDate>Mon, 22 Mar 2010 12:42:49 +0000</pubDate>
		<dc:creator>Andy Smith</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[pxe]]></category>
		<category><![CDATA[pxeboot]]></category>
		<category><![CDATA[pxelinux]]></category>
		<category><![CDATA[squeeze]]></category>

		<guid isPermaLink="false">http://andys.org.uk/bits/?p=78</guid>
		<description><![CDATA[<p>It&#8217;s often the case that there&#8217;s no easy way of installing a machine that doesn&#8217;t have any removable media. For instance, I have an old Compaq Deskpro EN that&#8217;s too old to support booting from USB, so using something like UNetbootin is out of the question. Luckily, there&#8217;s an an alternative, which is to PXE [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s often the case that there&#8217;s no easy way of installing a machine that doesn&#8217;t have any removable media. For instance, I have an old <a href="http://h18000.www1.hp.com/products/quickspecs/10021_div/10021_div.HTML">Compaq Deskpro EN</a> that&#8217;s too old to support booting from USB, so using something like <a href="http://http://unetbootin.sourceforge.net/">UNetbootin</a> is out of the question. Luckily, there&#8217;s an an alternative, which is to <a href="http://en.wikipedia.org/wiki/Preboot_Execution_Environment">PXE</a> boot an installer over the network.</p>
<p><span id="more-78"></span><br />
PXE (or <em>Preboot eXecution Environment</em>) is a means of booting a machine over a network,which conveniently removes any requirement for anything special on the machine that&#8217;s to be installed other than an network card. PXE boot (or <em>network boot</em>) support tends to be available in older machines that don&#8217;t support booting from USB, so it&#8217;s a very useful feature to be able to use.</p>
<p>There&#8217;s a very useful article on <a href="http://www.debian-administration.org/articles/478">Debian Administration</a> that covers configuring a Debian machine to act as a PXE boot server to serve out an <a href="http://wiki.debian.org/DebianEtch">etch</a> installer. I personally run <a href="http://www.debian.org/releases/testing/">squeeze</a>, so I&#8217;ve used the article as a basis for setting up a Debian squeeze machine to serve out a squeeze installer.</p>
<h3>Installing the prerequisites</h3>
<p>To start with, we need a TFTP server and a DHCP server. You might already have one (or both) of these installed already, but for the purposes of this we&#8217;ll assume that you haven&#8217;t. So, to get started, install the tftpd-hpa and dhcp3-server packages:-</p>
<blockquote><p><code>apt-get install tftpd-hpa dhcp3-server</code></p></blockquote>
<h3>Configuring DHCPd</h3>
<p>First, make sure that the tftpboot directory exists. This used to be <code>/var/lib/tftpboot</code>, but Debian now uses <code>/srv/tftpboot</code>. The installer should have created it, but just in case, check it exists and if create it if not.</p>
<p>The next step is to add a subnet declaration to <code>/etc/dhcp3/dhcpd.conf</code> for your network. A simple one will be something like this:-</p>
<blockquote>
<pre>subnet 192.168.51.0 netmask 255.255.255.0 {
       range 192.168.51.64 192.168.51.80;
       <span style="color: #008000;">filename "pxelinux.0";
       next-server 192.168.51.1;</span>
       option routers 192.168.51.1;
}</pre>
</blockquote>
<p>If you&#8217;ve already got DHCPd installed and configured, the two lines highlighted in green are the ones you need to add to your existing subnet declaration. The <code>filename</code> option tells PXE clients which file they need to request via TFTP, and the <code>next-server</code> option tells the clients the TFTP server they should use to get it.</p>
<h3>Creating the PXE boot environment</h3>
<p>Before we pull down any of the installer files, we need to create somewhere for those files to go, along with the PXE boot configuration. So, create the <code>pxelinux.cfg</code> and <code>debian/squeeze/i386</code> directories:-</p>
<blockquote>
<pre>mkdir -v /srv/tftpboot/pxelinux.cfg
mkdir -pv /srv/tftpboot/debian/squeeze/i386</pre>
</blockquote>
<p>Next, create the config for pxelinux in <code>pxelinux.cfg/default</code>:-</p>
<blockquote>
<pre>DISPLAY boot.txt

DEFAULT squeeze_i386_install

LABEL squeeze_i386_install
     kernel debian/squeeze/i386/linux
     append vga=normal initrd=debian/squeeze/i386/initrd.gz  --
LABEL squeeze_i386_linux
     kernel debian/squeeze/i386/linux
     append vga=normal initrd=debian/squeeze/i386/initrd.gz  --
LABEL squeeze_i386_expert
     kernel debian/squeeze/i386/linux
     append priority=low vga=normal initrd=debian/squeeze/i386/initrd.gz  --
LABEL squeeze_i386_rescue
     kernel debian/squeeze/i386/linux
     append vga=normal initrd=debian/squeeze/i386/initrd.gz  rescue/enable=true --
PROMPT 1
TIMEOUT 0</pre>
</blockquote>
<p>Then, create <code>boot.txt</code> in <code>pxelinux.cfg</code>, which is our boot menu:-</p>
<blockquote>
<pre>- Boot Menu -
=============

squeeze_i386_install
squeeze_i386_linux
squeeze_i386_expert
squeeze_i386_rescue</pre>
</blockquote>
<p>Finally, download the installer parts from the Debian FTP mirror:-</p>
<blockquote>
<pre>cd /srv/tftpboot/
wget <a title="http://ftp.uk.debian.org/debian/dists/squeeze/main/installer-i386/current/images/netboot/debian-installer/i386/pxelinux.0" rel="nofollow" href="http://ftp.uk.debian.org/debian/dists/squeeze/main/installer-i386/current/images/netboot/debian-installer/i386/pxelinux.0">http://ftp.uk.debian.org/debian/dists/squeeze/main/installer-i386/current/images/netboot/debian-installer/i386/pxelinux.0</a>
cd /srv/tftpboot/debian/squeeze/i386
wget <a title="http://ftp.uk.debian.org/debian/dists/squeeze/main/installer-i386/current/images/netboot/debian-installer/i386/linux" rel="nofollow" href="http://ftp.uk.debian.org/debian/dists/squeeze/main/installer-i386/current/images/netboot/debian-installer/i386/linux">http://ftp.uk.debian.org/debian/dists/squeeze/main/installer-i386/current/images/netboot/debian-installer/i386/linux</a>
wget <a title="http://ftp.uk.debian.org/debian/dists/squeeze/main/installer-i386/current/images/netboot/debian-installer/i386/initrd.gz" rel="nofollow" href="http://ftp.uk.debian.org/debian/dists/squeeze/main/installer-i386/current/images/netboot/debian-installer/i386/initrd.gz">http://ftp.uk.debian.org/debian/dists/squeeze/main/installer-i386/current/images/netboot/debian-installer/i386/initrd.gz</a></pre>
</blockquote>
<h3>Final steps</h3>
<p>Make sure that tftpd-hpa and dhcp3-server are running:-</p>
<blockquote><p><code>service tftpd-hpa restart<br />
service dhcp3-server restart</code></p></blockquote>
<p>You should now be able to network boot machines into the Debian squeeze installer.</p>
<p>I&#8217;ve also put this on the <a href="http://andys.org.uk/wiki">Bits Wiki</a> as a <a href="http://andys.org.uk/wiki/Guide:PXE_network_booting_Debian_install">guide</a> &#8211; feel free to have a look and add any notes you feel may be useful!</p>
]]></content:encoded>
			<wfw:commentRss>http://andys.org.uk/bits/2010/03/22/pxe-booting-a-debian-squeeze-install/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google Streetview in the UK&#8230; updated!</title>
		<link>http://andys.org.uk/bits/2010/03/11/google-streetview-in-the-uk-updated/</link>
		<comments>http://andys.org.uk/bits/2010/03/11/google-streetview-in-the-uk-updated/#comments</comments>
		<pubDate>Thu, 11 Mar 2010 13:28:46 +0000</pubDate>
		<dc:creator>Andy Smith</dc:creator>
				<category><![CDATA[Misc]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[streetview]]></category>

		<guid isPermaLink="false">http://andys.org.uk/bits/?p=72</guid>
		<description><![CDATA[<p>So the little birdies were correct &#8211; Google have just updated Streetview for the UK. They&#8217;ve spent the last year or so photographing the length and breadth of the country, and now it&#8217;s all there to see, including such wonders as this blurry-faced chap:-</p>
<p></p>
<p>Yeah, that&#8217;s me, on my way out to work. I&#8217;ll ignore any [...]]]></description>
			<content:encoded><![CDATA[<p>So the little birdies were correct &#8211; Google have just updated Streetview for the UK. They&#8217;ve spent the last year or so photographing the length and breadth of the country, and now it&#8217;s all there to see, including such wonders as this blurry-faced chap:-</p>
<p><a href="http://maps.google.co.uk/maps?f=q&#038;source=s_q&#038;hl=en&#038;geocode=&#038;q=dn7+5hd&#038;sll=53.518804,-1.167422&#038;sspn=0.008586,0.01929&#038;ie=UTF8&#038;hq=&#038;hnear=Doncaster+DN7+5HD,+United+Kingdom&#038;ll=53.593766,-1.022694&#038;spn=0.00852,0.01929&#038;z=16&#038;layer=c&#038;cbll=53.593847,-1.022695&#038;panoid=Svai1LMmNEUAsYv4d8IQKg&#038;cbp=12,27.13,,0,18.31"><img class="aligncenter size-full wp-image-73" title="Google_Streetview_Bootham" src="http://andys.org.uk/bits/wp-content/uploads/2010/03/Clipboard01.jpg" alt="" width="631" height="471" /></a></p>
<p>Yeah, that&#8217;s me, on my way out to work. I&#8217;ll ignore any comments about my shirt&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://andys.org.uk/bits/2010/03/11/google-streetview-in-the-uk-updated/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iproute2: Life after ifconfig</title>
		<link>http://andys.org.uk/bits/2010/02/24/iproute2-life-after-ifconfig/</link>
		<comments>http://andys.org.uk/bits/2010/02/24/iproute2-life-after-ifconfig/#comments</comments>
		<pubDate>Wed, 24 Feb 2010 23:57:17 +0000</pubDate>
		<dc:creator>Andy Smith</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[ifconfig]]></category>
		<category><![CDATA[iproute2]]></category>

		<guid isPermaLink="false">http://andys.org.uk/bits/?p=56</guid>
		<description><![CDATA[<p>The standard network tools ifconfig, netstat and route will be familiar to anyone with more than a passing interest in UNIX or any of its derivations. Linux is no exception, and if you hop on to your nearest Linux machine, you&#8217;ll find these installed. However, for the past few years ifconfig and its ilk (often [...]]]></description>
			<content:encoded><![CDATA[<p>The standard network tools <em>ifconfig</em>, <em>netstat </em>and <em>route </em>will be familiar to anyone with more than a passing interest in UNIX or any of its derivations. Linux is no exception, and if you hop on to your nearest Linux machine, you&#8217;ll find these installed. However, for the past few years ifconfig and its ilk (often collectively referred to as <em>net-tools</em>) <a href="http://en.wikipedia.org/wiki/Ifconfig#Current_status">have been deprecated</a> in favour of the <strong>iproute2</strong> suite.</p>
<p><span id="more-56"></span>iproute2 is a suite of tools developed to unify the functions provided by the traditional tools in one place under the <code><strong>ip</strong></code> command. Interface configuration, routing and tunnelling can now all be configured and managed using the ip command.</p>
<h3>Interface configuration</h3>
<p>Historically, interfaces are managed using the <a href="http://en.wikipedia.org/wiki/Ifconfig">ifconfig</a> command, and to get an overview of the interfaces you&#8217;d type <code>ifconfig -a</code>. With iproute2, interfaces addressing is managed through the address subcommand &#8211; which, like the rest of the subcommands for iproute2 can be shortened Cisco IOS-style, as long as it&#8217;s unique. In theory this means you can use <code>ip a</code>, but the manual page refers to it as <code>ip addr</code>, which I&#8217;ll use here for clarity. So, the equivalent of <code>ifconfig -a</code> is the self-explanatory <code>ip addr show</code>, which if we&#8217;re not specifying a specific interface can be shortened to simply <code>ip addr</code>:-</p>
<blockquote>
<pre>[root@example ~]# <strong>ip addr</strong>
1: lo: &lt;LOOPBACK,UP,LOWER_UP&gt; mtu 16436 qdisc noqueue state UNKNOWN
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eth0: &lt;NO-CARRIER,BROADCAST,MULTICAST,UP&gt; mtu 1500 qdisc
      pfifo_fast state DOWN qlen 1000
    link/ether 00:d0:b7:2d:ce:cf brd ff:ff:ff:ff:ff:ff
    inet 192.0.2.1/24 brd 192.0.2.255 scope global eth0</pre>
</blockquote>
<p>Most of this should be self-explanatory, and everything you would see with <code>ifconfig -a</code> you&#8217;ll see with <code>ip addr</code>.</p>
<p>Bringing up <strong>eth0</strong> on a Linux box would usually consist of doing the following:-</p>
<blockquote>
<pre>[root@example ~]# <strong>ifconfig eth0 up</strong>
[root@example ~]# <strong>ifconfig eth0 192.0.2.1 netmask 255.255.255.0</strong></pre>
</blockquote>
<p>With iproute2, control of interfaces themselves &#8211; both physical and logical &#8211; is through the <strong>link</strong> subcommand. Bringing up eth0 can be done with:-</p>
<pre>
<blockquote>
<pre>[root@example ~]# <strong>ip link set eth0 up</strong></pre>
</blockquote>
</pre>
<p>Managing the addresses on an interface is through the aforementioned addr subcommand, so using our example again, we&#8217;d do something like this to add an IP to eth0:-</p>
<pre>
<blockquote>
<pre>[root@example ~]# <strong>ip addr add 192.0.2.1/24 dev eth0</strong></pre>
</blockquote>
</pre>
<p>I&#8217;ve used CIDR notation in this example, but you can use the normal dotted quad format for the netmask if you wish.</p>
<p>This also makes adding multiple IP addresses to interfaces really easy. To add <strong>192.0.2.2</strong> to our example eth0 interface, you&#8217;d just do:-</p>
<pre>
<pre>
<blockquote>
<pre>[root@example ~]# <strong>ip addr add 192.0.2.2/24 dev eth0</strong></pre>
</blockquote>
</pre>
</pre>
<p>Showing the addresses on our eth0 interface only will show that both the addresses are now there:-</p>
<blockquote>
<pre>[root@example ~]# <strong>ip addr show dev eth0</strong>
2: eth0: &lt;NO-CARRIER,BROADCAST,MULTICAST,UP&gt; mtu 1500 qdisc
      pfifo_fast state DOWN qlen 1000
    link/ether 00:d0:b7:2d:ce:cf brd ff:ff:ff:ff:ff:ff
    inet 192.0.2.1/24 brd 192.0.2.255 scope global eth1
    inet 192.0.2.2/24 scope global secondary eth1</pre>
</blockquote>
<p>Removing an IP from an interface is also straightforward:-</p>
<blockquote>
<pre>[root@example ~#] <strong>ip addr del 192.0.2.2/24 dev eth0</strong></pre>
</blockquote>
<p>Querying the interface again shows that 192.0.2.2 is no longer assigned to eth0:-</p>
<blockquote>
<pre>[root@example ~]# <strong>ip addr show dev eth0</strong>
2: eth0: &lt;NO-CARRIER,BROADCAST,MULTICAST,UP&gt; mtu 1500 qdisc
      pfifo_fast state DOWN qlen 1000
    link/ether 00:d0:b7:2d:ce:cf brd ff:ff:ff:ff:ff:ff
    inet 192.0.2.1/24 brd 192.0.2.255 scope global eth1</pre>
</blockquote>
<h3>Routing</h3>
<p>Using <code>netstat -rn</code> is pretty much burned into the brains of most UNIX engineers, but luckily the iproute2 method is just as snappy. Routing management is handled with the <strong>route</strong> subcommand, and in line with <strong>addr</strong> and <strong>link</strong>, it can be shortened &#8211; <code>ip r</code> will work, but I usually settle for <code>ip ro</code>. The full command for showing the routing table is <code>ip route show</code>, but as with <code>ip addr</code> you can drop the <strong>show</strong> if you want to show the entire routing table:-</p>
<blockquote>
<pre>[root@example ~]# <strong>ip ro</strong>
192.0.2.0/24 dev eth0  proto kernel  scope link  src 192.0.2.1
default via 192.0.2.254 dev eth0</pre>
</blockquote>
<p>Adding and removing routes is accomplished with <code>ip ro add</code> and <code>ip ro del</code> respectively:-</p>
<blockquote>
<pre>[root@example ~]# <strong>ip ro add 10.0.0.0/16 via 192.0.2.253</strong>
[root@example ~]# <strong>ip ro del 10.0.0.0/16 via 192.0.2.253</strong></pre>
</blockquote>
<p>One useful feature of <code>ip route</code> is the <strong>get</strong> function, which we can use to query the routing table for a particular network or address. In our example, querying for an address not on our local network shows that the route to it goes via our default gateway:-</p>
<blockquote>
<pre>[root@example ~]# <strong>ip ro get 1.2.3.4</strong>
1.2.3.4 via 192.0.2.254 dev eth0  src 192.0.2.1
    cache  mtu 1500 advmss 1460 hoplimit 64</pre>
</blockquote>
<h3>Neighbours</h3>
<p><code>arp -na</code> is the traditional way you&#8217;d query the ARP table on a UNIX machine. You can accomplish this with iproute2 using <code>ip neighbor</code> (or <code>ip neighbour</code> for us not from the US), with <code>ip n</code> being the shortened extreme:-</p>
<blockquote>
<pre>[root@example ~]# <strong>ip neigh</strong>
192.0.2.3 dev eth0 lladdr 00:02:a5:1f:cb:2d REACHABLE
192.0.2.254 dev eth0 lladdr 00:09:43:bc:aa:80 REACHABLE</pre>
</blockquote>
<p>I&#8217;ll skip the example for this, but needless to say you can add and remove entries with <code>ip neigh add</code> and <code>ip neigh del</code> respectively.</p>
<h3>A little helping hand</h3>
<p>If you&#8217;re stuck, then the help argument can come in handy. If you specify help as an argument to ip itself, or to one of the subcommands, it&#8217;ll give you a quick overview of the options available. For example, for <strong>ip neighbor</strong>:-</p>
<blockquote>
<pre>[root@example ~]# <strong>ip neigh help</strong>
Usage: ip neigh { add | del | change | replace } { ADDR [ lladdr
          LLADDR ] [ nud { permanent | noarp | stale |
          reachable } ] | proxy ADDR } [ dev DEV ]
       ip neigh {show|flush} [ to PREFIX ] [ dev DEV ] [ nud STATE ]</pre>
</blockquote>
<h3>Not forgetting IPv6&#8230;</h3>
<p>I&#8217;ve purposely neglected to show any configuration of IPv6 addresses in this post, not because iproute2 can&#8217;t handle it, but for the exact opposite reason &#8211; the iproute2 suite will handle IPv6 addresses in exactly the same way as IPv4 addresses. All the commands used above can be used for both IPv4 and IPv6 configuration without any issues.</p>
<p>If there&#8217;s a reason you want to force the behaviour one way or the other, you can use the <code>-4</code> and <code>-6</code> switches. This isn&#8217;t needed normally, because when adding or removing an address, for example, iproute2 will happily recognise an IPv6 address instead of an IPv4 one. Where it does come in useful is if you want to limit the data returned in a query to just IPv6, or just IPv4. A real-world example of this is on one of my Linux machines, where ip -6 ro shows:-</p>
<blockquote>
<pre>[root@daedalus ~]# <strong>ip -6 ro</strong>
2001:470:XXXX:1::/64 dev eth0  proto kernel  metric 256  mtu 1500
  advmss 1440 hoplimit 0
fe80::/64 dev eth0  proto kernel  metric 256  mtu 1500 advmss 1440
  hoplimit 0
default via 2001:470:XXXX:1::1 dev eth0  metric 1  mtu 1500 advmss
  1440 hoplimit 0</pre>
</blockquote>
<p>&#8230;which comes in handy if you&#8217;re only interested in the IPv6 routing table.</p>
<h3>What next?</h3>
<p>This post only really scratches the surface of iproute2 &#8211; I&#8217;ve just covered the iproute2 equivalents of the most-used commands. It&#8217;s capable of much, much more, such as <a href="http://www.deepspace6.net/docs/iproute2tunnel-en.html">setting up tunnels</a>, managing <a href="http://linux-ip.net/html/routing-tables.html">multiple routing tables</a> and configuring interfaces for multicast to name a few. I&#8217;ll be covering some of these in more depth in future posts.</p>
<h3>Further reading</h3>
<ul>
<li>The <a href="http://lartc.org/howto/">Linux Advanced Routing &amp; Traffic Control HOWTO</a>, which is probably <em>the</em> definitive guide when it comes to iproute2</li>
<li><a href="http://en.wikipedia.org/wiki/Iproute2">iproute2 on Wikipedia</a></li>
<li>The Linux Foundation&#8217;s <a href="http://www.linuxfoundation.org/collaborate/workgroups/networking/iproute2">iproute2 page</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://andys.org.uk/bits/2010/02/24/iproute2-life-after-ifconfig/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>The Great White North</title>
		<link>http://andys.org.uk/bits/2010/02/22/the-great-white-north/</link>
		<comments>http://andys.org.uk/bits/2010/02/22/the-great-white-north/#comments</comments>
		<pubDate>Mon, 22 Feb 2010 18:51:43 +0000</pubDate>
		<dc:creator>Andy Smith</dc:creator>
				<category><![CDATA[Canada]]></category>

		<guid isPermaLink="false">http://andys.org.uk/bits/?p=52</guid>
		<description><![CDATA[<p>Sometimes, people decide to do something big, something life-changing, something that will undoubtedly cause a huge amount of upheaval in their life.</p>
<p>I&#8217;m talking about emigration.</p>
<p>For varying reasons, over the past year, me and Bec (my good lady wife) have decided that our medium-to-long term plans are to attempt to emigrate to Canada. We&#8217;re under no [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes, people decide to do something big, something life-changing, something that will undoubtedly cause a huge amount of upheaval in their life.</p>
<p>I&#8217;m talking about emigration.</p>
<p><span id="more-52"></span>For varying reasons, over the past year, me and Bec (my good lady wife) have decided that our medium-to-long term plans are to attempt to emigrate to Canada. We&#8217;re under no illusions &#8211; we&#8217;re aware of the many pitfalls and problems that may or may not arise. It&#8217;s certainly not going to be a walk in the park.</p>
<h3>So why?</h3>
<p>Why indeed &#8211; and let me be honest from the outset: I&#8217;ve never ever been to Canada. This may strike <span style="text-decoration: line-through;">some</span> <span style="text-decoration: line-through;">many</span> most people as completely insane &#8211; why would we want to go somewhere we&#8217;ve never been? It&#8217;s a good question, and one I don&#8217;t really have an answer for, other than</p>
<ul>
<li>it looks nice</li>
<li>we want somewhere better for our son to grow up</li>
<li>it&#8217;s not here</li>
</ul>
<p>The last point is the one that I do get a bit of stick about &#8211; the grass isn&#8217;t always greener on the other side, etc. &#8211; and I accept that the area of the UK in which I live probably colours my judgement somewhat. I was born, brought up and still live in Doncaster, in South Yorkshire, but it&#8217;s not a place I want to bring up my son.</p>
<p>So why Canada? Well, why not? Many of its cities score highly on various quality-of-life surveys, but most of all &#8211; it&#8217;s somewhere different. It&#8217;s true that I could relocate to another part of the UK, but if I&#8217;m going to go to the effort of moving within the UK, I may as well go the whole nine yards.</p>
<h3>It&#8217;s not gonna be easy</h3>
<p>Difficult isn&#8217;t the word. In fact, before we even think of emigrating, I need to find a job.</p>
<p>I work in the IT industry, and my current role means I have to be highly skilled across a number of disciplines. However, I effectively left school at the age of 16, and this means I didn&#8217;t go to university. No university obviously means no degree, which instantly puts me at a disadvantage, because it means I can&#8217;t apply for Permanent Residency as a<a href="http://www.cic.gc.ca/English/information/applications/skilled.asp"> Federal Skilled Worker</a>.</p>
<p>This leaves me with only one real option, which is to find a job. This too isn&#8217;t straightforward, because:-</p>
<ul>
<li>it has to be a job that they can&#8217;t find a Canadian citizen for,</li>
<li>it requires the company to apply for an <a href="http://www.cic.gc.ca/ENGLISH/work/employers/lmo-basics.asp">LMO</a>,</li>
<li>the company has to be willing to be involved in the immigration process, and</li>
<li>I need a work permit</li>
</ul>
<p>This makes our chances &#8211; if I&#8217;m honest with myself &#8211; vanishingly small. I wasn&#8217;t kidding when I said this wasn&#8217;t going to be easy &#8211; and this is all before even considering the emigration part itself.</p>
<h3>The beginning</h3>
<p>So, this really marks the beginning of something which might never come to fruition rather than a concrete plan of action. It&#8217;s my line in the sand &#8211; my mark to say that this is where I started.</p>
<p>I&#8217;ve started the ball rolling by applying for a handful of jobs, and sending my resume to recruitment agencies. Bearing in mind that I&#8217;m at a disadvantage already, I don&#8217;t expect to move from this point any time soon. In the meantime, though, I&#8217;ll post bits and bobs as and when I have something to say about it.</p>
<p>Watch this space!</p>
]]></content:encoded>
			<wfw:commentRss>http://andys.org.uk/bits/2010/02/22/the-great-white-north/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Fixing Likewise startup scripts on Debian Squeeze</title>
		<link>http://andys.org.uk/bits/2010/02/11/fixing-likewise-startup-scripts-on-debian-squeeze/</link>
		<comments>http://andys.org.uk/bits/2010/02/11/fixing-likewise-startup-scripts-on-debian-squeeze/#comments</comments>
		<pubDate>Thu, 11 Feb 2010 00:13:35 +0000</pubDate>
		<dc:creator>Andy Smith</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[chkconfig]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[fix]]></category>
		<category><![CDATA[likewise]]></category>
		<category><![CDATA[squeeze]]></category>
		<category><![CDATA[startup]]></category>

		<guid isPermaLink="false">http://andys.org.uk/bits/?p=47</guid>
		<description><![CDATA[<p>Just a quick one, this&#8230;</p>
<p>If you install Likewise Open on Debian Squeeze, you may notice that it doesn&#8217;t start on boot-up. The reason is because the new dependency-based boot sequence doesn&#8217;t like the init scripts Likewise provides.</p>
<p>Luckily, it&#8217;s pretty easy to fix. First, make sure you have chkconfig installed (apt-get install chkconfig if not), change [...]]]></description>
			<content:encoded><![CDATA[<p>Just a quick one, this&#8230;</p>
<p>If you install <a href="http://www.likewise.com/">Likewise Open</a> on <a href="http://www.debian.org/releases/squeeze/">Debian Squeeze</a>, you may notice that it doesn&#8217;t start on boot-up. The reason is because the new dependency-based boot sequence doesn&#8217;t like the init scripts Likewise provides.</p>
<p>Luckily, it&#8217;s pretty easy to fix. First, make sure you have <a href="http://articles.techrepublic.com.com/5100-10878_11-5033660.html">chkconfig</a> installed (<code>apt-get install chkconfig</code> if not), change into your <code>/etc/init.d</code> directory and do this:-</p>
<blockquote>
<pre>for INIT in lsassd lwiod eventlogd dcerpcd netlogond lwregd srvsvcd; do \
   echo "Fixing '${INIT}'..."; \
   sed -i -e 's/^#LWI_STARTUP_TYPE_SUSE#/#/g' \
      -e 's/Default-Start: 3 5/Default-Start: 2 3 4 5/g' \
      -e 's/Default-Stop: 0 1 2 6/Default-Stop: 0 1 6/g' ${INIT}; \
done</pre>
<pre>for INIT in lsassd lwiod netlogond eventlogd dcerpcd; do \
   echo "Disabling ${INIT}..."; \
   chkconfig -d ${INIT}; \
done</pre>
<pre>for INIT in dcerpcd eventlogd netlogond lwiod lsassd; do \
   echo "Re-enabling ${INIT}..."; \
   chkconfig -a ${INIT}; \
done</pre>
</blockquote>
<p>This uncomments the SUSE parts of the init scripts, which chkconfig wants. It then calls chkconfig to first delete each entry, and then re-add it to make sure everything&#8217;s okay. Reboot, and you should have working domain authentication without having to manually start it up.</p>
]]></content:encoded>
			<wfw:commentRss>http://andys.org.uk/bits/2010/02/11/fixing-likewise-startup-scripts-on-debian-squeeze/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>IPv6 for a Linux generation</title>
		<link>http://andys.org.uk/bits/2010/02/07/ipv6-for-an-linux-generation/</link>
		<comments>http://andys.org.uk/bits/2010/02/07/ipv6-for-an-linux-generation/#comments</comments>
		<pubDate>Sun, 07 Feb 2010 23:35:04 +0000</pubDate>
		<dc:creator>Andy Smith</dc:creator>
				<category><![CDATA[IPTables/Netfilter]]></category>
		<category><![CDATA[IPv6]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://andys.org.uk/bits/?p=33</guid>
		<description><![CDATA[<p>IPv6 is nothing new &#8211; it was finally standardised back in 1998 in RFC 2460, and virtually all operating systems have supported it now for at least 5 years, so most people are in a position to give it a try.</p>
<p>If you&#8217;re one of the lucky ones, your ISP might provide native IPv6 connectivity (like [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://en.wikipedia.org/wiki/IPv6">IPv6</a> is nothing new &#8211; it was finally standardised back in 1998 in <a href="http://tools.ietf.org/html/rfc2460">RFC 2460</a>, and virtually all operating systems have supported it now for at least 5 years, so most people are in a position to give it a try.</p>
<p>If you&#8217;re one of the lucky ones, your ISP might provide native IPv6 connectivity (like <a href="http://www.aaisp.net.uk/kb-broadband-ipv6.html">AAISP</a>), but for most of us, the main way to get connected to the rest of the IPv6 Internet is to use something we&#8217;ve already got &#8211; IPv4. And we&#8217;re going to tunnel over it.</p>
<p><span id="more-33"></span>The first thing we need to do is choose a tunnel broker, which is a fancy name for someone who&#8217;ll provide us with an IPv4 endpoint we can tunnel IPv6 over. Wikipedia <a href="http://en.wikipedia.org/wiki/List_of_IPv6_tunnel_brokers">has a list</a>, but the main, globally available ones are <a href="http://tunnelbroker.net/">Hurricane Electric</a> and <a href="http://www.sixxs.net/">SixXS</a>. Either of these will do, and some people prefer HE over SixXS, but that&#8217;s a purely personal choice &#8211; in my experience, both work equally as well. For this example, though, we&#8217;ll go with HE &#8211; so head on over to <a href="http://tunnelbroker.net/">http://tunnelbroker.net/</a> and create an account.</p>
<h2>My first tunnel</h2>
<p>Once you&#8217;ve created your account, log in and create a tunnel. For some reason, it always seems to pick their New York POP, so you might want to manually choose one geographically closer (in my case &#8211; and for our example &#8211; London, UK)</p>
<div id="attachment_34" class="wp-caption aligncenter" style="width: 439px"><a href="http://andys.org.uk/bits/wp-content/uploads/2010/02/tunnel1.png"><img class="size-full wp-image-34" title="Creating a tunnel" src="http://andys.org.uk/bits/wp-content/uploads/2010/02/tunnel1.png" alt="" width="429" height="502" /></a><p class="wp-caption-text">Creating a tunnel</p></div>
<p>The IP address you use as your local end of the tunnel will need to be a public IP address. It&#8217;s possible to use a machine behind a NAT device if it&#8217;s in a DMZ-style setup where all the traffic destined for the public IP address gets forwarded by the NAT device to the machine behind it, but your mileage may vary.</p>
<p>Once created, view the tunnel details, which should look something like this:-</p>
<div id="attachment_35" class="wp-caption aligncenter" style="width: 460px"><a href="http://andys.org.uk/bits/wp-content/uploads/2010/02/tunnel2.png"><img class="size-full wp-image-35" title="Editing the tunnel details" src="http://andys.org.uk/bits/wp-content/uploads/2010/02/tunnel2.png" alt="Editing the tunnel details" width="450" height="324" /></a><p class="wp-caption-text">Editing the tunnel details</p></div>
<p style="text-align: left;">
<p style="text-align: left;">Our tunnel has been created! At the bottom of the page, you&#8217;ll notice a little drop-down that generates the commands needed to bring up the tunnel. For this example, we&#8217;re using <a href="http://en.wikipedia.org/wiki/Iproute2">iproute2</a>, so the commands go something like this:-</p>
<p><span style="font-size: x-small;"> </span></p>
<blockquote>
<pre>ip tunnel add he-ipv6 mode sit remote 216.66.80.26 local 192.0.2.1 ttl 255
ip link set he-ipv6 up
ip addr add 2001:470:1f08:810::2/64 dev he-ipv6
ip route add ::/0 dev he-ipv6</pre>
</blockquote>
<p>The first command creates an IPv6-in-IPv4 tunnel between us and HE, and the second command brings up that tunnel. The third command adds our IPv6 address to our end of the tunnel, and finally the fourth command sets the IPv6 default route to be down our newly-created tunnel.</p>
<p>And that&#8217;s it &#8211; we&#8217;re now connected to the global IPv6 internet. To test it, let&#8217;s try pinging something:-</p>
<blockquote>
<pre>mordor:~# <strong>ping6 -c 3 www.he.net</strong>
PING www.he.net(he.net) 56 data bytes
64 bytes from he.net: icmp_seq=1 ttl=58 time=375 ms
64 bytes from he.net: icmp_seq=2 ttl=58 time=257 ms
64 bytes from he.net: icmp_seq=3 ttl=58 time=255 ms</pre>
<pre>--- www.he.net ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2002ms
rtt min/avg/max/mdev = 255.562/296.218/375.628/56.158 ms</pre>
</blockquote>
<p>If you see something like the above, then give yourself a pat on the back, because it&#8217;s working!</p>
<h2>Next steps</h2>
<p>HE by default assigns you a <strong>/64</strong> network, which is <a href="http://www.ripe.net/docs/ipv6policy.html#assignment_size">the smallest size intended to be allocated</a>. This gives you <strong>18,446,744,073,709,551,616</strong> IPs, and whichever way you look at it that&#8217;s a lot of addresses. With this in mind, you might be wondering why HE will give you a <strong>/48</strong> (that&#8217;s <em><strong>1,208,925,819,614,629,174,706,176</strong></em> IPs!). The reason is that each network is intended to have a /64, and a /48 allows you to carve up that space into a total of <strong>65,536</strong> separate /64 networks. Now this obviously sounds like overkill to the average user, but autoconfiguration tools such as <a href="http://en.wikipedia.org/wiki/Radvd">radvd</a> won&#8217;t work with networks smaller than /64, again because of the intentions mentioned previously. This means that if you have more than one network at home (say, a wired network and a wireless network, currently with separate IPv4 networks for each), you can assign a /64 to each one.</p>
<p>With this is mind, let&#8217;s ask HE for a /48 by clicking on <strong>Allocate</strong> in the &#8216;Routed /48&#8242; section. After a few seconds, you&#8217;ll see something like this:-</p>
<div id="attachment_37" class="wp-caption aligncenter" style="width: 456px"><a href="http://andys.org.uk/bits/wp-content/uploads/2010/02/tunnel4.png"><img class="size-full wp-image-37" title="Allocating our /48" src="http://andys.org.uk/bits/wp-content/uploads/2010/02/tunnel4.png" alt="" width="446" height="51" /></a><p class="wp-caption-text">Allocating our /48</p></div>
<p>In our example, we&#8217;ve been allocated <code>2001:470:90d3::/48</code>, and now it&#8217;s time to plan our IP schema.</p>
<h2>Laying it out</h2>
<p>Taking my own home network as an example, I have three networks &#8211; one for general use (the &#8216;<em>LAN</em>&#8216;), one for guest use over wireless (the &#8216;<em>WLAN</em>&#8216;), and finally a DMZ (the&#8230; er, &#8216;<em>DMZ</em>&#8216;). We could lay these out like this:-</p>
<ul>
<li>LAN &#8211; <code>2001:470:90d3:<strong><span style="color: #008000;">1</span></strong>::/64</code></li>
<li>DMZ &#8211; <code>2001:470:90d3:<span style="color: #008000;"><strong>2</strong></span>::/64</code></li>
<li>WLAN &#8211; <code>2001:470:90d3:<strong><span style="color: #008000;">3</span></strong>::/64</code></li>
</ul>
<p>Nice and simple, and easy to remember. Assuming all three networks are connected to the same gateway machine, we can give the gateway the first IP in the range &#8211; <code>2001:470:90d3:<strong><span style="color: #008000;">1::1</span></strong></code>, <code>2001:470:90d3:<strong><span style="color: #008000;">2::1</span></strong></code> and <code>2001:470:90d3:<strong><span style="color: #008000;">3::1</span></strong></code>.</p>
<h2>Routing things further</h2>
<p>Before we start, we need to enable IP forwarding for IPv6:-</p>
<blockquote>
<pre>sysctl -w net.ipv6.conf.all.forwarding=1</pre>
</blockquote>
<p>You&#8217;ll probably want to add this somewhere so it gets activated on bootup &#8211; under Debian this would be in <code>/etc/sysctl.conf</code> (which already has the entry, albeit commented out).</p>
<p>One way to provide connectivity to machines on the individual networks is to manually give each machine an IPv6 address, and to route it through our gateway:-</p>
<blockquote>
<pre>ip addr add 2001:470:90d3:1::2/64 dev eth0
ip route add ::/0 via 2001:470:90d3:1::1 dev eth0</pre>
</blockquote>
<p>Again, all being well, you should now be able to route to the wider IPv6 Internet from our newly-configured IPv6 node. More importantly, this also means that the wider IPv6 Internet can route back to you &#8211; which brings us to&#8230;</p>
<h2>Security, not obscurity</h2>
<p>Don&#8217;t be fooled into thinking that because of the immense range of possible IPv6 addresses that securing your new IPv6 setup isn&#8217;t required &#8211; IPv6 is no exception when it comes to the Internet Bad Guys, so implementing firewall rules is of the utmost importance.</p>
<p>The problem with IPv4 and NAT is that it&#8217;s allowed people to become somewhat complacent about security, because machines behind a NAT device are naturally unreachable from the global Internet. IPv6 does not have NAT, which means you don&#8217;t have this (rather lazy) safety net, so we have to do it properly.</p>
<p>Luckily, if you&#8217;re familiar with <a href="http://www.netfilter.org/projects/iptables/index.html">iptables</a>, you&#8217;ll be glad to know that there&#8217;s an IPv6 equivalent &#8211; and it&#8217;s called (predicatably) <a href="http://www.centos.org/docs/4/html/rhel-rg-en-4/s1-ip6tables.html">ip6tables</a>. The syntax is identical, and in fact the only noticeable difference is that you&#8217;re using IPv6 addresses and networks instead of IPv4 ones.</p>
<p>A quick example would go something like this:-</p>
<blockquote>
<pre><em># Clear our INPUT, OUTPUT and FORWARD chains</em>
ip6tables -F INPUT
ip6tables -F OUTPUT
ip6tables -F FORWARD

<em># Allow packets related to existing connections</em>
ip6tables -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
ip6tables -A FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT

<em># Allow link-local (for neighbour discovery)</em>
ip6tables -A INPUT -s fe80::/10 -j ACCEPT

<em># Allow SSH inbound to our gateway from our LAN</em>
ip6tables -A INPUT -i lan -s 2001:470:90d3:1::/64 -p tcp
   -m tcp --dport 22 -j ACCEPT

<em># Allow all outbound from our networks</em>
ip6tables -A FORWARD -i dmz -s 2001:470:90d3:1::/64 -j ACCEPT
ip6tables -A FORWARD -i lan -s 2001:470:90d3:2::/64 -j ACCEPT
ip6tables -A FORWARD -i wlan -s 2001:470:90d3:3::/64 -j ACCEPT

<em># Allow all outbound from our gateway</em>
ip6tables -A OUTPUT -j ACCEPT

<em># Allow SSH and HTTPS inbound to our DMZ</em>
ip6tables -A FORWARD -i he-ipv6 -d 2001:470:90d3:1::/64 -p tcp
   -m multiport --dports 22,443 -j ACCEPT

<em># Set the default policy to drop</em>
ip6tables -P INPUT DROP
ip6tables -P FORWARD DROP
ip6tables -P OUTPUT DROP</pre>
</blockquote>
<p>So there you have it &#8211; IPv6 firewalling needn&#8217;t be difficult. If you want to make something more complex, you might want to take a look at my previous post about <a href="http://andys.org.uk/bits/2010/01/27/iptables-fun-with-mark/">iptables and the &#8216;mark&#8217; target</a>, which also applies to ip6tables.</p>
<h2>IPv6 &#8211; automatically</h2>
<p>Just like DHCP for IPv4, there are autoconfiguration mechanisms for IPv6 &#8211; radvd and DHCPv6. Radvd is the older of the two, but both can be used for the same purpose. Configuration of radvd is relatively straightforward, and if we wanted to provide autoconfiguration on our example LAN, we can do something like this:-</p>
<blockquote>
<pre>interface lan
{
      AdvSendAdvert on;
      MinRtrAdvInterval 3;
      MaxRtrAdvInterval 10;
      AdvDefaultPreference low;
      AdvHomeAgentFlag off;

      prefix 2001:470:90d3:2::/64
      {
            AdvOnLink on;
            AdvAutonomous on;
            AdvRouterAddr off;
      };
};</pre>
</blockquote>
<h2>Where next?</h2>
<p>This only covers the start &#8211; there&#8217;s more involved in bringing an IPv6 network up to scratch, like setting up forward and reverse <a href="http://www.linuxjournal.com/article/6541">DNS</a>, and <a href="http://tldp.org/HOWTO/Linux+IPv6-HOWTO/chapter-hints-daemons.html">configuring</a> <a href="http://www.linuxjournal.com/article/5451">various</a> <a href="http://www.bieringer.de/linux/IPv6/IPv6-HOWTO/IPv6-HOWTO-7.html">daemons</a> to talk over IPv6 as well as IPv4. If you&#8217;re interested, you might find some of the following links useful reading:-</p>
<ul>
<li><a href="http://tldp.org/HOWTO/Linux+IPv6-HOWTO/index.html">Peter Bieringer&#8217;s Linux IPv6 Howto</a></li>
<li><a href="http://www.ipv6.org.uk/">IPv6 in the UK</a></li>
<li><a href="http://tools.ietf.org/html/rfc2460">RFC 2460 &#8211; IPv6 Specification</a></li>
<li><a href="http://www.deepspace6.net/">Deep Space 6</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://andys.org.uk/bits/2010/02/07/ipv6-for-an-linux-generation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>GnuPG &#8211; RSA key-pair mini-Howto with stronger digests</title>
		<link>http://andys.org.uk/bits/2010/02/02/gnupg-rsa-key-pair-mini-howto/</link>
		<comments>http://andys.org.uk/bits/2010/02/02/gnupg-rsa-key-pair-mini-howto/#comments</comments>
		<pubDate>Tue, 02 Feb 2010 15:19:16 +0000</pubDate>
		<dc:creator>Andy Smith</dc:creator>
				<category><![CDATA[Cryptography]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[gnupg]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[rsa]]></category>
		<category><![CDATA[stronger digests]]></category>

		<guid isPermaLink="false">http://andys.org.uk/bits/?p=29</guid>
		<description><![CDATA[<p>(Note: This was originally posted on my previous blog, but I&#8217;ve noticed that it&#8217;s being linked to, so I&#8217;ve reposted it here)</p>
<p>I&#8217;m not a mathematician (or a cryptographer) so I&#8217;m happy to take this post&#8216;s word for it about a recent attack against SHA-1 (short PDF here). The post goes into detail about changing the [...]]]></description>
			<content:encoded><![CDATA[<p><em>(<strong>Note</strong>: This was originally posted on my previous blog, but I&#8217;ve noticed that it&#8217;s being linked to, so I&#8217;ve reposted it here)</em></p>
<p>I&#8217;m not a mathematician (or a cryptographer) so I&#8217;m happy to take <a href="http://www.debian-administration.org/users/dkg/weblog/48">this post</a>&#8216;s word for it about a recent attack against <a href="http://en.wikipedia.org/wiki/SHA-1">SHA-1</a> (short PDF <a href="http://http://eurocrypt2009rump.cr.yp.to/837a0a8086fa6ca714249409ddfae43d.pdf">here</a>). The post goes into detail about changing the preferred digests on a key, and is well worth a read.</p>
<p>The post also talks about using 2048-bit RSA keys, instead of the DSA/Elgamal default (which has a maximum size of 1024 bits). It goes into detail about how to migrate to an RSA key &#8211; if you&#8217;re going to migrate, I definitely recommend reading it.</p>
<p>However, I thought it would be nice to write a (very) quick guide on generating RSA private keys with GnuPG, as there are a few extra steps involved &#8211; but nothing complicated!<br />
<span id="more-29"></span></p>
<h2>Preparation</h2>
<p>The first thing mentioned in the post on Debian Administration is to set a couple of GnuPG config options to ensure that any digests generated by you are using the stronger SHA256, rather than SHA-1. Doing this is simple:-</p>
<blockquote>
<pre>cat &gt;&gt;~/.gnupg/gpg.conf &lt;&lt;EOF
personal-digest-preferences SHA256
cert-digest-algo SHA256
EOF</pre>
</blockquote>
<p>We&#8217;re now ready to generate our key.</p>
<h2>Generate our first key</h2>
<p>To start with, start the key generation as normal:-</p>
<blockquote>
<pre>[andys@sirius ~]$ <strong>gpg --gen-key</strong>
Please select what kind of key you want:
   (1) DSA and Elgamal (default)
   (2) DSA (sign only)
   (5) RSA (sign only)</pre>
</blockquote>
<p>(1) is the default, and generates a DSA key with an Elgamal subkey for encrypting. But for our RSA key, we need to choose (5).</p>
<p>Next, we&#8217;re asked for our key length. This is between 1024 and 4096 bits. The default is 2048, but for mine I&#8217;ve chosen 4096. A good overview of keys and key sizes can be found on pgp.net <a href="http://www.pgp.net/pgpnet/pgp-faq/pgp-faq-keys.html#key-size">here</a>.</p>
<blockquote>
<pre>RSA keys may be between 1024 and 4096 bits long.
What keysize do you want? (2048) <strong>4096</strong>
Requested keysize is 4096 bits</pre>
</blockquote>
<p>The next question is about how long you want the key to be valid. Again, this is personal preference, and in this instance I&#8217;ve chosen &#8217;0&#8242; for &#8216;never expires&#8217;:-</p>
<blockquote>
<pre>Please specify how long the key should be valid.
         0 = key does not expire
      &lt;n&gt;  = key expires in n days
      &lt;n&gt;w = key expires in n weeks
      &lt;n&gt;m = key expires in n months
      &lt;n&gt;y = key expires in n years
Key is valid for? (0) <strong>0</strong>
Key does not expire at all
Is this correct? (y/N) <strong>y</strong></pre>
</blockquote>
<p>Next up is your user ID, which consists of your name, e-mail address and a comment. I tend to leave the comment field blank, but it&#8217;s there if you want it:-</p>
<blockquote>
<pre>You need a user ID to identify your key; the software constructs the
user ID from the Real Name, Comment and E-mail Address in this form:
    "Heinrich Heine (Der Dichter) &lt;heinrichh@duesseldorf.de&gt;"

Real name: <strong>Andy Smith</strong>
E-mail address: <strong>andy.smith@netprojects.org.uk</strong>
Comment: <em><strong>[Return]</strong></em>
You selected this USER-ID:
    "Andy Smith &lt;andy.smith@netprojects.org.uk&gt;"</pre>
<pre>Change (N)ame, (C)omment, (E)-mail or (O)kay/(Q)uit?</pre>
</blockquote>
<p>Select &#8216;O&#8217; to continue.</p>
<blockquote>
<pre>You need a Passphrase to protect your secret key.</pre>
</blockquote>
<p>You&#8217;re now being prompted to set a passphrase on the key. This can be as strong or as weak as you like, but considering the importance of your private key it&#8217;s best to secure it with a strong passphrase.</p>
<p>After supplying a passphrase, the actual key will be generated. RSA keys require quite a bit of entropy (&#8216;randomness&#8217;), and you&#8217;ll probably get a warning like this:-</p>
<blockquote>
<pre>Not enough random bytes available.  Please do some other work to give
the OS a chance to collect more entropy!  (Need 284 more bytes)</pre>
</blockquote>
<p>A good way to generate entropy is to create lots of I/O traffic (keyboard, mouse, network, disk, etc.). I found using <code>cat(1)</code> on files and redirecting the output to <code>/dev/null</code> worked quite well, especially if you use a block device of some sort (for example, I did <code>cat /dev/sdb &gt;/dev/null</code>, where <code>/dev/sdb</code> was a 1GB USB key).</p>
<p>Eventually &#8211; hopefully after not too much of a wait &#8211; gpg will report that it has completed generating the key, and you&#8217;ll have output a bit like this:-</p>
<blockquote>
<pre>gpg: key A0E6B93E marked as ultimately trusted
public and secret key created and signed.</pre>
<pre>gpg: checking the trustdb
gpg: 3 marginal(s) needed, 1 complete(s) needed, PGP trust model
gpg: depth: 0  valid:   2  signed:   0  trust: 0-, 0q, 0n, 0m, 0f, 2u
pub   <span style="color: #ff0000;">4096R</span>/<span style="color: #ff0000;">A0E6B93E </span>2009-05-08
 Key fingerprint = B2C5 59E3 E685 757A 45CD  7760 5BF3 1276 A0E6 B93E
uid                  Andy Smith &lt;andy.smith@netprojects.org.uk&gt;</pre>
<pre><span style="color: #ff0000;">Note that this key cannot be used for encryption.  You may want to use
the command "--edit-key" to generate a subkey for this purpose.</span></pre>
</blockquote>
<p>The key ID is now given, which in this case is A0E6B93E. We can also see (on the line that starts with &#8216;pub&#8217;) that the key is 4096 bits in size, and is an RSA key (denoted by the &#8216;R&#8217;). Sharp-eyed readers may have noticed that the key ID is actually the last 8 bytes<sup>[1]</sup> of the key&#8217;s fingerprint &#8211; this is because the key ID is just a shorter way of expressing the key fingerprint, and in itself isn&#8217;t guaranteed (or indeed intended) to be unique.</p>
<p>Also important is the last two lines, which point out that our brand spanking new key can&#8217;t be used to encrypt anything just yet.</p>
<h2>Adding encryption</h2>
<p>So without further ado, let&#8217;s create a subkey that lets us do encryption with our key:-</p>
<blockquote>
<pre>[andys@sirius ~]$ <strong>gpg --edit-key A0E6B93E</strong>
&lt;...version information...&gt;</pre>
<pre>Secret key is available.

pub  4096R/A0E6B93E  created: 2009-05-08  expires: never
  usage: SC
 trust: ultimate      validity: ultimate
[ultimate] (1). Andy Smith &lt;andy.smith@netprojects.org.uk&gt;

Command&gt;</pre>
</blockquote>
<p>Unsuprisingly, &#8216;addkey&#8217; is the command we want to generate a subkey, so that&#8217;s what we&#8217;ll run. Upon hitting enter, you&#8217;ll be prompted for the passphrase you set on your key earlier. Once given, you&#8217;ll be presented with a menu like this:-</p>
<blockquote>
<pre>Please select what kind of key you want:
 (2) DSA (sign only)
 (4) Elgamal (encrypt only)
 (5) RSA (sign only)
 (6) RSA (encrypt only)
Your selection?</pre>
</blockquote>
<p>Since it&#8217;s to complement our existing RSA key &#8211; which can already be used for signing &#8211; (6) is the option we want. Picking it brings us to a familiar prompt, wherein we&#8217;re asked for a key size:-</p>
<blockquote>
<pre>RSA keys may be between 1024 and 4096 bits long.
What keysize do you want? (2048) <strong>4096</strong></pre>
</blockquote>
<p>The subkey&#8217;s size doesn&#8217;t have to match that of the parent key, but in this case I&#8217;ve gone for the same size, so 4096 it is. After picking a size, you&#8217;ll again be asked how long you want the key to be valid for. I&#8217;ve gone for 0 again, but again it doesn&#8217;t have to match that of the parent key. There is a slight difference, in that you&#8217;ll be prompted twice, just to make sure that you want to create the subkey:-</p>
<blockquote>
<pre>Really create? (y/N) <strong>y</strong></pre>
</blockquote>
<p>Now it&#8217;s time once more to play the entropy game. Use whatever you found worked for you earlier, and eventually you&#8217;ll see something like this:-</p>
<blockquote>
<pre>pub  4096R/A0E6B93E  created: 2009-05-08  expires: never
  usage: SC
                     trust: ultimate      validity: ultimate
sub  4096R/5D0CCD64  created: 2009-05-08  expires: never
  usage: E
[ultimate] (1). Andy Smith &lt;andy.smith@netprojects.org.uk&gt;</pre>
</blockquote>
<p>As you can see, I now have a subkey with a fingerprint ending in 5D0CCD64, which can be used for encryption &#8211; denoted by the &#8216;E&#8217; at the end of the line. Also noted is that the key is &#8216;ultimately trusted&#8217; by me, because it&#8217;s been added as a subkey to my key.</p>
<h2>Changing the digest settings</h2>
<p>As per the post linked to at the beginning, we can change the digest (or &#8216;hash&#8217;) that we prefer to receive signed data in. Without going into too much detail (you should read the post!), we can change these preferences:-</p>
<blockquote>
<pre class="terminal"><span class="input">Command&gt; <strong>setpref SHA512 SHA384 SHA256 SHA224 AES256 AES192 AES
  CAST5 ZLIB BZIP2 ZIP Uncompressed</strong>
</span></pre>
</blockquote>
<p>Our preferences are confirmed back to us, and we&#8217;re asked to accept them:-</p>
<blockquote>
<pre class="terminal">Set preference list to:
     Cipher: AES256, AES192, AES, CAST5, 3DES
     Digest: SHA512, SHA384, SHA256, SHA224, SHA1
     Compression: ZLIB, BZIP2, ZIP, Uncompressed
     Features: MDC, Keyserver no-modify
Really update the preferences? (y/N) <strong><span class="input">y</span></strong></pre>
</blockquote>
<h2>Confirming our changes</h2>
<p>Since we&#8217;re now finished, we need to save the key to confirm our subkey:-</p>
<blockquote>
<pre>Command&gt; <strong>save</strong>
[andys@sirius ~]$ _</pre>
</blockquote>
<p>At this point, the key can now be used for signing and encryption. You can do other things, such as add a small photo to the key using the &#8216;addphoto&#8217; command, but two things you should do are to publish the key to a keyserver, and to generate a revocation certificate.</p>
<h2>Publishing your new key</h2>
<p>I won&#8217;t dwell too much on details, but in brief keyservers are exactly what they sound like &#8211; they serve keys out to users. Submitting your key to a keyserver allows other people to search for and download your public key from a keyserver. This saves you having to send a copy to everybody who wants it, for one.</p>
<p>Submitting is simple:-</p>
<blockquote>
<pre>[andys@sirius ~]$ <strong>gpg --keyserver keys.gnupg.net --send-key A0E6B93E</strong>
gpg: sending key A0E6B93E to hkp server keys.gnupg.net</pre>
</blockquote>
<p>Providing there are no errors, your key has been submitted to the keyserver at keys.gnupg.net.</p>
<h2>Revocation</h2>
<p>There&#8217;s a few reasons why you may no longer wish to use a key. It might have been compromised by a 3rd party, or it might simply be that you&#8217;ve forgotten the password. That&#8217;s why it&#8217;s <span style="text-decoration: line-through;">a good idea</span> imperative that you generate a revocation certificate <em>and store it somewhere safe and inaccessible to everyone but you!</em> A revocation certificate allows the holder of the certificate to revoke your key, and ideally the holder will be you and only you.</p>
<p>To generate a revocation certificate:-</p>
<blockquote>
<pre>[andys@sirius ~]$ <strong>gpg --gen-revoke A0E6B93E &gt;A0E6B93E-rev.asc</strong></pre>
</blockquote>
<p>This then gives us:-</p>
<blockquote>
<pre>sec  4096R/A0E6B93E 2009-05-08 Andy Smith &lt;andy.smith@netprojects.org.uk&gt;</pre>
<pre>Create a revocation certificate for this key? (y/N) <strong>y</strong></pre>
</blockquote>
<p>After answering in the affirmative, you&#8217;ll be prompted for a reason why you want to revoke the key. In my case, I&#8217;m going to choose (3), as the key was created for the purposes of this demonstration, but as you can see there are a number of other options to choose from:-</p>
<blockquote>
<pre>Please select the reason for the revocation:
  0 = No reason specified
  1 = Key has been compromised
  2 = Key is superseded
  3 = Key is no longer used
  Q = Cancel
(Probably you want to select 1 here)
Your decision? <strong>3</strong></pre>
</blockquote>
<p>You can now enter a description, which is fairly obvious:-</p>
<blockquote>
<pre>Enter an optional description; end it with an empty line:
&gt; <strong>Demonstration</strong>
&gt; <em><strong>[Return]</strong></em>
Reason for revocation: Key is no longer used
Demonstration</pre>
<pre>Is this okay? (y/N) <strong>y</strong></pre>
</blockquote>
<p>Answer yes, and you&#8217;ll again be prompted for your passphrase:-</p>
<blockquote>
<pre>You need a passphrase to unlock the secret key for
user: "Andy Smith &lt;andy.smith@netprojects.org.uk&gt;"
4096-bit RSA key, ID A0E6B93E, created 2009-05-08</pre>
<pre>ASCII armoured output forced.
Revocation certificate created.</pre>
<pre>Please move it to a medium which you can hide away; if Mallory gets
access to this certificate he can use it to make your key unusable.
It is smart to print this certificate and store it away, just in case
your media become unreadable.  But have some caution:  The print
system of your machine might store the data and make it available to
others!</pre>
</blockquote>
<p>At this point, you now have a revocation certificate in A0E6B93E-rev.asc. If you want to revoke this key now (which we do), then import it. It&#8217;s important to note that you <span style="text-decoration: underline;"><strong>don&#8217;t import the revocation certificate until you actually want to revoke the key</strong></span>. Anyway, here&#8217;s how:-</p>
<blockquote>
<pre>[andys@sirius ~]$ <strong>gpg --import &lt;A0E6B93E-rev.asc</strong></pre>
</blockquote>
<p>You won&#8217;t be asked to confirm this action, and you&#8217;ll immediately see the following:-</p>
<blockquote>
<pre>gpg: key A0E6B93E: "Andy Smith &lt;andy.smith@netprojects.org.uk&gt;" revocation certificate imported
gpg: Total number processed: 1
gpg:    new key revocations: 1
gpg: 3 marginal(s) needed, 1 complete(s) needed, PGP trust model
gpg: depth: 0  valid:   2  signed:   0  trust: 0-, 0q, 0n, 0m, 0f, 2u</pre>
</blockquote>
<p>This indicates that the key has now been revoked, which we can check by typing:-</p>
<blockquote>
<pre>[andys@sirius ~]$ <strong>gpg -k A0E6B93E</strong>
pub   4096R/A0E6B93E 2009-05-08 [revoked: 2009-05-08]
uid                  Andy Smith &lt;andy.smith@netprojects.org.uk&gt;</pre>
</blockquote>
<p>All that remains is for us to repeat the process we used earlier to submit our key to the keyserver, which this time will send the revoked version of the key:-</p>
<blockquote>
<pre>[andys@sirius ~]$ gpg --keyserver keys.gnupg.net --send-key A0E6B93E
gpg: sending key A0E6B93E to hkp server keys.gnupg.net</pre>
</blockquote>
<p>Our key will now appear to be revoked to anyone who looks for it.</p>
<h2>Summary</h2>
<p>That should just about cover the basics of generating an public/private RSA key pair with GnuPG. There&#8217;s a lot more that can be done with it, and having a good read about cryptography in general will help you get your head around some of the fruitier bits.</p>
<li> [1] &#8211; Thanks to Tero Pesonen who correctly pointed out that I&#8217;d originally put <em>8 <strong>bits</strong></em> when of course it&#8217;s the last <em>8 <strong>bytes</strong></em>.[2] Cheers Tero!</li>
<li>[2] &#8211; Thanks also to Tom, who pointed out that both myself and Tero were wrong &#8211; it&#8217;s the last <em><strong>4 bytes</strong></em>. I might give up now <img src='http://andys.org.uk/bits/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /><br />
<h2>Further reading</h2>
<p>Thanks to <a href="http://www.fifthhorseman.net/">Daniel Kahn Gillmor</a> for his article &#8216;<a href="http://www.debian-administration.org/users/dkg/weblog/48">HOWTO prep for migration off of SHA-1 in OpenPGP</a>&#8216;, which details the digest steps above and was the inspiration for this article. Thanks also to Martin Krafft for his post &#8216;<span id="title"><a href="http://madduck.net/blog/2009.04.30:the-need-for-a-gpg-revocation-certificate/">The need for a GPG revocation certificate</a>&#8216;. </span></p>
<ul>
<li>The comp.security.pgp FAQ &#8211; <a href="http://www.pgp.net/pgpnet/pgp-faq/">http://www.pgp.net/pgpnet/pgp-faq/</a></li>
<li><a href="http://www.debian-administration.org/users/dkg/weblog/48">HOWTO prep for migration off of SHA-1 in OpenPGP</a> (Daniel Kahn Gillmor / Debian Administration)</li>
<li><span id="title"><a href="http://madduck.net/blog/2009.04.30:the-need-for-a-gpg-revocation-certificate/">The need for a GPG revocation certificate</a> (Martin Krafft)<br />
</span></li>
<li><a href="http://en.wikipedia.org/wiki/Pretty_Good_Privacy">Pretty Good Privacy</a> (Wikipedia)</li>
</ul>
</li>
]]></content:encoded>
			<wfw:commentRss>http://andys.org.uk/bits/2010/02/02/gnupg-rsa-key-pair-mini-howto/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
