<?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>Racker Hacker &#187; Blog Posts</title>
	<atom:link href="http://rackerhacker.com/category/uncategorized/feed/" rel="self" type="application/rss+xml" />
	<link>http://rackerhacker.com</link>
	<description>Words of wisdom from a server administrator</description>
	<lastBuildDate>Wed, 16 May 2012 12:55:04 +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>Lesser-known but extremely handy Linux tools</title>
		<link>http://rackerhacker.com/2012/05/11/lesser-known-but-extremely-handy-linux-tools/</link>
		<comments>http://rackerhacker.com/2012/05/11/lesser-known-but-extremely-handy-linux-tools/#comments</comments>
		<pubDate>Fri, 11 May 2012 21:28:58 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[sysadmin]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=3318</guid>
		<description><![CDATA[Kristóf Kovács has a fantastic post about some lesser-known Linux tools that can really come in handy in different situations. If you haven't tried dstat (I hadn't until I saw Kristóf's post), this is a great one to try. You can keep a running tally on various server metrics including load average, network transfer, and [...]<p><a href="http://rackerhacker.com/2012/05/11/lesser-known-but-extremely-handy-linux-tools/">Lesser-known but extremely handy Linux tools</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p>Kristóf Kovács <a href="http://kkovacs.eu/cool-but-obscure-unix-tools">has a fantastic post</a> about some lesser-known Linux tools that can really come in handy in different situations.</p>
<p>If you haven't tried <code>dstat</code> (I hadn't until I saw Kristóf's post), this is a great one to try.  You can keep a running tally on various server metrics including load average, network transfer, and disk operations.</p>
<p>Here is some sample output:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">----total-cpu-usage---- ---paging-- ---load-avg--- ------memory-usage----- -net/total- ---procs--- --io/total- ---system-- ----tcp-sockets----
usr sys idl wai hiq siq|  in   out | 1m   5m  15m | used  buff  cach  free| recv  send|run blk new| read  writ| int   csw |lis act syn tim clo
  0   0 100   0   0   0|   0     0 |0.07 0.25 0.25| 866M  249M  537M  387M|1314B  180B|  0   0   0|   0     0 |  70    80 | 13   7   0   0   5
  0   0 100   0   0   0|   0     0 |0.07 0.25 0.25| 866M  249M  537M  387M|1779B 1004B|  0   0   0|   0     0 |  84    78 | 13   7   0   0   5
  0   0 100   0   0   0|   0     0 |0.07 0.25 0.25| 866M  249M  537M  387M| 904B  362B|1.0   0 1.0|   0     0 |  75    86 | 13   9   0   0   5
  0   0 100   0   0   0|   0     0 |0.07 0.25 0.25| 866M  249M  537M  386M|2203B 1559B|  0   0   0|   0     0 | 180   127 | 13   7   0   0   5
  0   0 100   0   0   0|   0     0 |0.07 0.25 0.25| 866M  249M  537M  386M| 260B  130B|  0   0   0|   0     0 |  53    66 | 13   7   0   0   5
  0   0 100   0   0   0|   0     0 |0.07 0.25 0.25| 866M  249M  537M  387M|  52B  114B|  0   0   0|   0     0 |  54    77 | 13   7   0   0   5
  0   0 100   0   0   0|   0     0 |0.07 0.25 0.25| 866M  249M  537M  387M|2271B  872B|  0   0   0|   0     0 |  94    79 | 13   7   0   0   5
  0   0 100   0   0   0|   0     0 |0.07 0.25 0.25| 866M  249M  537M  387M|  52B  130B|  0   0   0|   0     0 |  54    74 | 13   7   0   0   5
  0   0 100   0   0   0|   0     0 |0.07 0.25 0.25| 866M  249M  537M  387M|1126B 1254B|  0   0   0|   0  24.0 |  80    87 | 13   7   0   0   5
  0   0 100   0   0   0|   0     0 |0.07 0.25 0.25| 866M  249M  537M  387M|1030B  130B|  0   0   0|   0     0 |  88    82 | 13   7   0   0   5
  0   0 100   0   0   0|   0     0 |0.06 0.24 0.25| 866M  249M  537M  387M| 578B  114B|  0   0   0|   0     0 |  53    64 | 13   7   0   0   5
  0   0 100   0   0   0|   0     0 |0.06 0.24 0.25| 866M  249M  537M  387M|1597B  890B|  0   0   0|   0     0 |  85    79 | 13   7   0   0   5
  0   0 100   0   0   0|   0     0 |0.06 0.24 0.25| 866M  249M  537M  387M| 552B  114B|  0   0   0|   0     0 |  63    77 | 13   7   0   0   5
  0   0 100   0   0   0|   0     0 |0.06 0.24 0.25| 866M  249M  537M  387M|1624B 1254B|  0   0   0|   0     0 |  81    75 | 13   7   0   0   5
  0   0 100   0   0   0|   0     0 |0.06 0.24 0.25| 866M  249M  537M  387M| 478B  114B|  0   0   0|   0     0 |  67    73 | 13   7   0   0   5
  0   0 100   0   0   0|   0     0 |0.06 0.24 0.25| 866M  249M  537M  387M| 418B  114B|  0   0   0|   0     0 |  59    74 | 13   7   0   0   5
  0   0 100   0   0   0|   0     0 |0.06 0.24 0.25| 866M  249M  537M  387M|1265B  874B|  0   0   0|   0     0 |  82    73 | 13   7   0   0   5
  0   0 100   0   0   0|   0     0 |0.06 0.24 0.25| 866M  249M  537M  387M| 758B  114B|  0   0   0|   0     0 |  60    80 | 13   7   0   0   5
  0   0 100   0   0   0|   0     0 |0.06 0.24 0.25| 866M  249M  537M  387M|1236B 1255B|  0   0   0|   0  4.00 |  93    79 | 13   7   0   0   5
  0   0 100   0   0   0|   0     0 |0.06 0.24 0.25| 866M  249M  537M  387M|  52B  130B|  0   0   0|   0     0 |  71    70 | 13   7   0   0   5
  0   0 100   0   0   0|   0     0 |0.05 0.23 0.25| 866M  249M  537M  387M| 214B  114B|  0   0   0|   0     0 |  55    73 | 13   7   0   0   5
  0   0 100   0   0   0|   0     0 |0.05 0.23 0.25| 866M  249M  537M  387M|1201B  890B|  0   0   0|   0     0 |  80    80 | 13   7   0   0   5
  0   0 100   0   0   0|   0     0 |0.05 0.23 0.25| 866M  249M  537M  387M| 108B  114B|  0   0   0|   0     0 |  53    66 | 13   7   0   0   5
  0   0 100   0   0   0|   0     0 |0.05 0.23 0.25| 866M  249M  537M  387M|1344B 1254B|  0   0   0|   0  10.0 | 119    85 | 13   7   0   0   5
  0   0 100   0   0   0|   0     0 |0.05 0.23 0.25| 866M  249M  537M  387M| 172B  130B|  0   0   0|   0  8.00 |  80    82 | 13   7   0   0   5</pre></div></div>

<p>Learn more about <code>dstat</code> on <a href="http://dag.wieers.com/home-made/dstat/">Dag Wieërs' site</a>.</p>
<p><a href="http://rackerhacker.com/2012/05/11/lesser-known-but-extremely-handy-linux-tools/">Lesser-known but extremely handy Linux tools</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2012/05/11/lesser-known-but-extremely-handy-linux-tools/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Performance and redundancy boost for icanhazip.com</title>
		<link>http://rackerhacker.com/2012/04/18/performance-and-redundancy-boost-for-icanhazip-com/</link>
		<comments>http://rackerhacker.com/2012/04/18/performance-and-redundancy-boost-for-icanhazip-com/#comments</comments>
		<pubDate>Wed, 18 Apr 2012 23:30:06 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=3310</guid>
		<description><![CDATA[It's been a few years since I started a little project to operate a service to return your IPv4 and IPv6 address. Although there are a bunch of other sites that offer this service as well, I've been amazed by the gradually increasing traffic to icanhazip.com. Here's a sample of the latest statistics: Hits per [...]<p><a href="http://rackerhacker.com/2012/04/18/performance-and-redundancy-boost-for-icanhazip-com/">Performance and redundancy boost for icanhazip.com</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p>It's been a few years since I started <a href="/2009/07/31/get-the-public-facing-ip-for-any-server-with-icanhazip-com/">a little project</a> to operate a service to return your IPv4 and IPv6 address.  Although there are a bunch of other sites that offer this service as well, I've been amazed by the gradually increasing traffic to <a href="http://icanhazip.com/">icanhazip.com</a>.</p>
<p>Here's a sample of the latest statistics:</p>
<ul>
<li>Hits per day: <strong>1.8 million</strong> (about 21 hits/second)</li>
<li>Unique IP addresses per day: <strong>25,555</strong></li>
<li>Hits per day from IPv6 addresses: <strong>1,069</strong> (a little sad)</li>
<li>Bandwidth used per day: <strong>~ 400MB</strong></li>
</ul>
<p>The site is now running on multiple <a href="http://www.rackspace.com/cloud/cloud_hosting_products/servers/">Cloud Servers</a> at <a href="http://www.rackspace.com/cloud/">Rackspace</a> behind a <a href="http://www.rackspace.com/cloud/cloud_hosting_products/loadbalancers/">load balancer cluster</a>.  In addition, the DNS records are hosted with Rackspace's <a href="http://www.rackspace.com/cloud/cloud_hosting_products/dns/">Cloud DNS</a> service.</p>
<p>This should allow the site to reply more quickly and reliably.  If you have suggestions for other improvements, let me know!</p>
<p><a href="http://rackerhacker.com/2012/04/18/performance-and-redundancy-boost-for-icanhazip-com/">Performance and redundancy boost for icanhazip.com</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2012/04/18/performance-and-redundancy-boost-for-icanhazip-com/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Getting a Technical Job at Rackspace</title>
		<link>http://rackerhacker.com/2012/04/09/getting-a-technical-job-at-rackspace/</link>
		<comments>http://rackerhacker.com/2012/04/09/getting-a-technical-job-at-rackspace/#comments</comments>
		<pubDate>Mon, 09 Apr 2012 14:00:56 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[general advice]]></category>
		<category><![CDATA[interview]]></category>
		<category><![CDATA[rackspace]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=3286</guid>
		<description><![CDATA[You've probably noticed that the blog has slowed down a bit recently. Part of the slowdown is due to an uptick in work required to get OpenStack Nova and its related software up and running at Rackspace for Cloud Servers and another part of it is a severe case of writer's block. I threw out [...]<p><a href="http://rackerhacker.com/2012/04/09/getting-a-technical-job-at-rackspace/">Getting a Technical Job at Rackspace</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p>You've probably noticed that the blog has slowed down a bit recently.  Part of the slowdown is due to an uptick in work required to get <a href="http://www.openstack.org/">OpenStack</a> <a href="http://nova.openstack.org/">Nova</a> and its related software up and running at <a href="http://rackspace.com/">Rackspace</a> for <a href="http://www.rackspace.com/cloud/cloud_hosting_products/servers/">Cloud Servers</a> and another part of it is a severe case of writer's block.  I threw out some questions on Twitter about the topics people would like to see covered in some new posts and a commonly requested topic was employment at Rackspace.</p>
<p><a href="http://rackerhacker.com/wp-content/uploads/2012/04/boromir_rackspace_job.jpg"><img src="http://rackerhacker.com/wp-content/uploads/2012/04/boromir_rackspace_job-300x176.jpg" alt="Boromir - One Does Not Simply Get a Job at Rackspace" title="Boromir - One Does Not Simply Get a Job at Rackspace" width="300" height="176" class="alignright size-medium wp-image-3287" /></a><em>First things first, getting a job at Rackspace isn't easy.</em>  We don't <em>intentionally</em> make the process difficult.  It's just that the work we do is unique and demanding.</p>
<p>We work in a fast-paced, extremely dynamic team-centric environment.  While some people in the company work in extremely small teams or sometimes all by themselves, that's pretty few and far between.  We look for people who can survive and flourish in this atmosphere and we look for people who can do it all while working as a team.  Even with all of this hustle and bustle, we still remember why we're doing it: <strong>the pursuit of Fanatical Support for our customers</strong>.</p>
<p>Another thing to keep in mind is that there's no true secret for making it through the application process.  There's no magic combination of skills or "silver bullet" that will scoot you through.  Every candidate is reviewed individually for each position.  There have been several times at the end of an interview where we've gotten together and said: "Wow, this candidate is solid, but they're just not right for this position.  Let's find the right spot and see if there's a spot open."  We look for the right candidate for the right position at the right time.</p>
<p>One of the best ways to get ahead in the screening or interview process is to do a little homework about Rackspace and the products we offer.  Much of this is covered in a <a href="/2011/05/02/do-your-homework-before-a-technical-interview/">post I wrote in 2011</a>.  You'll go into the interviews with more confidence and it will be much more obvious that you're really interested in the position.</p>
<p>Don't be discouraged if the process takes a little longer than you expected.  When I was hired in 2006, I went through two phone pre-screens and then three back-to-back interviews in person.  Things have changed a little since then and I've heard of some candidates receiving two to three pre-screens via telephone and then one or two interviews in person.  The additional screening and interviews may be due to Rackers trying to find the right fit for a particular applicant.  As I said previously, we look for the right fit for each applicant.  We may consider you for a different position than you applied for if we feel like your skill set or personality fits that role better.</p>
<p>A very common question is what to wear to a Rackspace interview.  It's confusing to know exactly what's expected since we have Rackers in the building wearing everything from suits to flip-flops.  This is where you really have to go with your gut.  Interviewing for a customer-facing sales position while wearing a hoodie and shorts is probably going to bring a suboptimal result.  Keep in mind that there's really nothing negative about overdressing (but keep your tuxedo in the closet, seriously).  I wore a shirt and tie for my interviews in 2006 but my tie got caught in the car door and was shredded.  After a lot of cursing, I took off the tie and decided to wing it with my dress shirt.  Nobody ever said a word about it.</p>
<p>Remember to be flexible during the interviews.  You might be asked to draw a solution on a whiteboard or think through a really complicated situation.  Roll with it and keep your confidence up.  When you don't know something, admit it, but then talk about how you'd research an answer.</p>
<p>There's one last thing to keep in mind and it's really critical.  If you're ever asked about how you would solve a problem or how you solved a problem in the past, <strong>don't divulge any information which is confidential or proprietary to your current company</strong>.  Just tell the interviewers that you've solved the solution in the past but you'll need to keep things vague to maintain confidentiality.  We will definitely understand and we will encourage you to maintain that confidentiality.</p>
<p>Leave your comments if you have any!  I'll be glad to answer any questions you have.</p>
<p><a href="http://rackerhacker.com/2012/04/09/getting-a-technical-job-at-rackspace/">Getting a Technical Job at Rackspace</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2012/04/09/getting-a-technical-job-at-rackspace/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Why technical people should blog (but don&#039;t)</title>
		<link>http://rackerhacker.com/2012/03/30/why-technical-people-should-blog-but-dont/</link>
		<comments>http://rackerhacker.com/2012/03/30/why-technical-people-should-blog-but-dont/#comments</comments>
		<pubDate>Fri, 30 Mar 2012 14:30:45 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[general advice]]></category>
		<category><![CDATA[red hat]]></category>
		<category><![CDATA[rhca]]></category>
		<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[writing]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=3179</guid>
		<description><![CDATA[I originally wrote this post for the Rackspace Blog but I decided to post it here in case some of my readers might have missed it. Please feel free to leave your comments at the end of the post. Sometimes people talk to me about posts I've written on my blog, or posts they wish [...]<p><a href="http://rackerhacker.com/2012/03/30/why-technical-people-should-blog-but-dont/">Why technical people should blog (but don't)</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p><em style="color: grey;">I originally wrote this post for the <a href="http://www.rackspace.com/blog/why-technical-people-should-blog-but-dont/">Rackspace Blog</a> but I decided to post it here in case some of my readers might have missed it.  Please feel free to leave your comments at the end of the post.</em></p>
<hr />
Sometimes people talk to me about posts I've written on my blog, or posts they wish I would write. At some point during the discussion, I'll almost always ask the person why they don't start up their own blog or contribute to someone else's. Very few people actually seem interested when I probe them about writing posts on technical topics.</p>
<p>My mother was always the one who told me (and her students) that everyone has a story. She said that writing could be therapeutic in ways you probably won't consider until you've written something that someone else enjoys. Just as software developers exist to write software for their users, writers exist to write stories for their readers. There's nothing that says technical people can't become excellent writers who inspire others to learn and share their knowledge with others.</p>
<p>The goal of this post is to encourage technical people to enjoy writing, write efficiently and feel comfortable doing it. I'll roll through some of the most common responses I've received about why technical people don't blog about what they know.</p>
<blockquote><p>I don't think I'm really an expert on anything. I'm not an authority on any topic I can think of.</p></blockquote>
<p>I'm leading off with this response because it's the most critical to refute. If you don't take away anything else from this post, let it be this: you don't need to be an expert on a topic to write about it.</p>
<p>You can find examples of this by rolling through some of the posts on my blog. I'd consider myself to be an expert on one, maybe two topics, but I've written over 450 posts in the span of just over five years. I certainly didn't write all of those about the one or two topics I know best.</p>
<p>Write about what you know and don't be afraid to do a little research to become an authority on something. A great example of this was my post, entitled "<a href="/2012/02/02/kerberos-for-haters/">Kerberos for haters</a>." I had almost no expertise in Kerberos. In fact, I couldn't even configure it properly for my RHCA exam! However, I did a ton of research and began to understand how most of the pieces fit together. Many other people were just as confused and I decided to pack all of the knowledge I had about Kerberos into a blog post. Positive and negative feedback rolled in and it was obvious that my post taught some readers, inspired some others and angered a few.</p>
<p>What a great way to lead into the next response:</p>
<blockquote><p>What if I say something that isn't correct? I'll look like an idiot in front of the whole internet!</p></blockquote>
<p>Been there, done that. Every writer makes errors and comes up with bad assumptions at least once. Readers will call you out on your mistakes (some do it delicately while others don't) and it's your duty to correct your post or correct the reader. I've written posts with errors, and I've gotten a little lazy on my fact-checking from time to time. As my middle school journalism teacher always reminded me, the most important part of a mistake is what you do to clean it up and learn from it.</p>
<p>In short: you'll make mistakes. As long as you've done your due diligence to minimize them and respond to them promptly, your readers should forgive you.</p>
<p>Speaking of errors:</p>
<blockquote><p>I'm great at a command prompt but my spelling and grammar are awful. I write terribly.</p></blockquote>
<p>This is easily fixed. If you're one of those folks who live the do-it-yourself type of lifestyle, pick up a copy of <a href="http://en.wikipedia.org/wiki/The_Elements_of_Style"><em>The Elements of Style</em></a> by Strunk &#038; White. There are free PDF versions online or you can borrow one from your nearest journalist. No matter the situation you're in, this book has details about where punctuation should and shouldn't be, how to structure sentences and paragraphs, and how to properly cite your sources (really vital for research posts).</p>
<p>Hauling around a copy of an ultra-dry reference book may not be your thing. If that's the case, find someone you know who has a knack for writing. You can usually find helpful folks in marketing or corporate communications in most big companies who will take your post and return it covered in red ink ready for corrections (thanks, Garrett!). I've even <a href="http://fiverr.com/categories/all/tags/proofreading/order/latest/pages/1">spotted some folks on Fiverr</a> who will do this for as low as $5.</p>
<p>I'll wrap up with the second most common response:</p>
<blockquote><p>I don't know who I'm writing for? What if I write about something simple and the really technical folks think I'm a noob? What if I write something crazy complex and it goes over most people's heads?</p></blockquote>
<p>I've done both of these. Most Linux system administrators worth their salt know how to add and remove iptables rules, and they'd consider it to be pretty trivial work. Would it surprise you to know that out of over 450 posts, my post about <a href="/2007/02/09/delete-single-iptables-rules/">deleting a single iptables rule</a> is in the top five most accessed posts per month? I receive just over 11 percent of my monthly hits to this post. People are either learning from it or they can't remember how to delete the rule and they want to use the post as a quick reference. Either way, the post is valuable to many people even if I think it's the simplest topic possible.</p>
<p>On the flip side, I went nuts and wrote up a <a href="/redundant-cloud-hosting-configuration-guide/">complete how-to</a> for a redundant cloud hosting configuration complete with LVS, glusterfs, MySQL on DRBD, memcached, haproxy and ldirectord. I thought it would be valuable knowledge to a few folks but that it might sail over the heads of most of my readers. Again, I was wrong. The post is constantly in the top 10 most visited posts on the blog and I've probably received more feedback via comments, email and IRC about that post than any other. Once again, a post I thought would be mostly useless turned into a real conversation starter.</p>
<p><b>Let's conclude and wrap up.</b> Keep these things in mind if you feel discouraged about writing:</p>
<ul>
<li>Write about what interests you whether you're an expert on it or not</li>
<li>Don't be afraid to fail</li>
<li>Be responsive to your readers</li>
<li>Even if you think nobody will read your post, write it</li>
<li>Always ensure your voice shines through in your writing — this is what makes it special and appealing</li>
</ul>
<p><a href="http://rackerhacker.com/2012/03/30/why-technical-people-should-blog-but-dont/">Why technical people should blog (but don't)</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2012/03/30/why-technical-people-should-blog-but-dont/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>mysql-json-bridge: a simple JSON API for MySQL</title>
		<link>http://rackerhacker.com/2012/03/28/mysql-json-bridge-a-simple-json-api-for-mysql/</link>
		<comments>http://rackerhacker.com/2012/03/28/mysql-json-bridge-a-simple-json-api-for-mysql/#comments</comments>
		<pubDate>Thu, 29 Mar 2012 02:34:53 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[rackspace]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=3248</guid>
		<description><![CDATA[My quest to get better at Python led me to create a new project on GitHub. It's called mysql-json-bridge and it's ready for you to use. Why do we need a JSON API for MySQL? The real need sprang from a situation I was facing daily at Rackspace. We have a lot of production and [...]<p><a href="http://rackerhacker.com/2012/03/28/mysql-json-bridge-a-simple-json-api-for-mysql/">mysql-json-bridge: a simple JSON API for MySQL</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p>My quest to get better at <a href="http://python.org">Python</a> led me to create a new project on GitHub.  It's called <a href="https://github.com/rackerhacker/mysql-json-bridge">mysql-json-bridge</a> and it's ready for you to use.</p>
<p><b>Why do we need a JSON API for MySQL?</b><br />
The real need sprang from a situation I was facing daily at <a href="http://rackspace.com/">Rackspace</a>.  We have a lot of production and pre-production environments which are in flux but we need a way to query data from various MySQL servers for multiple purposes.  Some folks need data in ruby or python scripts while others need to drag in data with .NET and Java.  Wrestling with the various adapters and all of the user privileges on disparate database servers behind different firewalls on different networks was less than enjoyable.</p>
<p>That's where this bridge comes in.</p>
<p>The bridge essentially gives anyone the ability to talk to multiple database servers across different environments by talking to a single endpoint with easily configurable security and encryption.  As long as the remote user can make an HTTP POST and parse some JSON, they can query data from multiple MySQL endpoints.</p>
<p><b>How does it work?</b><br />
It all starts with a simple HTTP POST.  I've become a big fan of the Python <a href="http://python-requests.org">requests</a> module.  If you're using it, this is all you need to submit a query:</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: #ff7700;font-weight:bold;">import</span> requests
payload = <span style="color: black;">&#123;</span><span style="color: #483d8b;">'sql'</span>: <span style="color: #483d8b;">'SELECT * FROM some_tables WHERE some_column=some_value'</span><span style="color: black;">&#125;</span>
url = <span style="color: #483d8b;">&quot;http://localhost:5000/my_environment/my_database&quot;</span>
r = requests.<span style="color: black;">post</span><span style="color: black;">&#40;</span>url, data=payload<span style="color: black;">&#41;</span>
<span style="color: #ff7700;font-weight:bold;">print</span> r.<span style="color: black;">text</span></pre></div></div>

<p>The bridge takes your query and feeds it into the corresponding MySQL server.  When the results come back, they're converted to JSON and returned via the same HTTP connection.</p>
<p><b>What technology does it use?</b><br />
<a href="http://flask.pocoo.org/">Flask</a> does the heavy lifting for the HTTP requests and <a href="https://github.com/facebook/tornado/blob/master/tornado/database.py">Facebook's Tornado database class</a> wraps the <a href="http://mysql-python.sourceforge.net/">MySQLdb</a> module in something a little more user friendly.  Other than those modules, <a href="http://pyyaml.org/">PyYAML</a> and <a href="http://python-requests.org">requests</a> are the only other modules not provided by the standard Python libraries.</p>
<p><b>Is it fast?</b><br />
Yes.  I haven't done any detailed benchmarks on it yet, but the overhead is quite low even with a lot of concurrency.  The biggest slowdowns come from network latency between you and the bridge or between the bridge and the database server.  Keep in mind that gigantic result sets will take a longer time to transfer across the network and get transformed into JSON.</p>
<p><b>I found a bug.  I have an idea for an improvement.  You're terrible at Python.</b><br />
All feedback (and every pull request) is welcome.  I'm still getting the hang of Python (hey, I've only been writing in it seriously for a few weeks!) and I'm always eager to learn a new or better way to accomplish something.  Feel free to create an issue in GitHub or submit a pull request with a patch.</p>
<p><a href="http://rackerhacker.com/2012/03/28/mysql-json-bridge-a-simple-json-api-for-mysql/">mysql-json-bridge: a simple JSON API for MySQL</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2012/03/28/mysql-json-bridge-a-simple-json-api-for-mysql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Compare commits between two git branches</title>
		<link>http://rackerhacker.com/2012/03/15/compare-commits-between-two-git-branches/</link>
		<comments>http://rackerhacker.com/2012/03/15/compare-commits-between-two-git-branches/#comments</comments>
		<pubDate>Thu, 15 Mar 2012 15:00:24 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[shell]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=3104</guid>
		<description><![CDATA[I found myself stuck in a particularly nasty situation a few weeks ago where I had two git branches with some commits that were mixed up. Some commits destined for a branch called development ended up in master. To make matters worse, development was rebased on top of master and the history was obviously mangled. [...]<p><a href="http://rackerhacker.com/2012/03/15/compare-commits-between-two-git-branches/">Compare commits between two git branches</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p>I found myself stuck in a particularly nasty situation a few weeks ago where I had two git branches with some commits that were mixed up.  Some commits destined for a branch called development ended up in master.  To make matters worse, development was rebased on top of master and the history was obviously mangled.</p>
<p>My goal was to find out which commits existed in development but didn't exist anywhere in master.  From there, I needed to find out which commits existed in master that didn't exist in development.  That would give me all of the commits that needed to be in the development branch.</p>
<p>I constructed this awful looking bash mess to figure out which commits were in development but not in master:<br />
<script src="https://gist.github.com/2034011.js?file=commitdiff.sh"></script></p>
<p>I had a list of commits that existed in development but not in master:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">965cf71 Trollface
acda854 Some patch 2
bf1f3e2 Some patch 1
db1980c Packaging</pre></div></div>

<p>From there, I could swap <code>MASTER</code> and <code>DEV</code> to figure out which commits existed in master but not in development.  Only a couple of commits showed up and these were the ones which were committed and pushed to master inadvertently.  After a couple of careful cherry picks and reversions, my branches were back to normal.</p>
<p><a href="http://rackerhacker.com/2012/03/15/compare-commits-between-two-git-branches/">Compare commits between two git branches</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2012/03/15/compare-commits-between-two-git-branches/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>New Fedora and EPEL package: httpry</title>
		<link>http://rackerhacker.com/2012/03/14/new-fedora-and-epel-package-httpry/</link>
		<comments>http://rackerhacker.com/2012/03/14/new-fedora-and-epel-package-httpry/#comments</comments>
		<pubDate>Wed, 14 Mar 2012 14:00:29 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[red hat]]></category>
		<category><![CDATA[rpm]]></category>
		<category><![CDATA[scientific linux]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=3224</guid>
		<description><![CDATA[A fellow Racker showed me httpry about five years ago and I've had in my toolbox as a handy way to watch HTTP traffic. I'd used some crazy tcpdump arguments and some bash one-liners to pull out the information I needed but I never could get the live look that I really wanted. Here's an [...]<p><a href="http://rackerhacker.com/2012/03/14/new-fedora-and-epel-package-httpry/">New Fedora and EPEL package: httpry</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p>A fellow Racker showed me <a href="http://dumpsterventures.com/jason/httpry/">httpry</a> about five years ago and I've had in my toolbox as a handy way to watch HTTP traffic.  I'd used some crazy tcpdump arguments and some bash one-liners to pull out the information I needed but I never could get the live look that I really wanted.</p>
<p>Here's an example of what httpry's output looks like on a busy site like icanhazip.com:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">2012-03-13 23:29:39 186.x.x.x	192.x.x.x &gt; GET	icanhazip.com	/	HTTP/1.1	-	-
2012-03-13 23:29:39 192.x.x.x	186.x.x.x &lt; -	-	-	HTTP/1.1	200	OK
2012-03-13 23:29:39 187.x.x.x	192.x.x.x &gt; GET	icanhazip.com	/	HTTP/1.0	-	-
2012-03-13 23:29:39 192.x.x.x	187.x.x.x &lt; -	-	-	HTTP/1.0	200	OK
2012-03-13 23:29:39 188.x.x.x	192.x.x.x &gt; GET	icanhazip.com	/	HTTP/1.1	-	-
2012-03-13 23:29:39 192.x.x.x	188.x.x.x &lt; -	-	-	HTTP/1.1	200	OK
2012-03-13 23:29:39 189.x.x.x	192.x.x.x &gt; GET	icanhazip.com	/	HTTP/1.1	-	-
2012-03-13 23:29:39 192.x.x.x	189.x.x.x &lt; -	-	-	HTTP/1.1	200	OK</pre></div></div>

</pre>
<p>You can watch the requests come in and the responses go out in real time.  It even allows for BPF-style packet filters which allow you to narrow down the source and/or destination IP addresses and ports you want to watch.  You can run it as a foreground process or as a daemon depending on your needs.</p>
<p>It's now available as a <a href="https://admin.fedoraproject.org/updates/httpry">RPM package</a> for Fedora 15, 16, 17 (and rawhide) as well as EPEL 6 (for RHEL/CentOS/SL 6).</p>
<p><a href="http://rackerhacker.com/2012/03/14/new-fedora-and-epel-package-httpry/">New Fedora and EPEL package: httpry</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2012/03/14/new-fedora-and-epel-package-httpry/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Installing XenServer 6.0.2 on an AOpen MP57</title>
		<link>http://rackerhacker.com/2012/03/12/installing-xenserver-6-0-2-on-an-aopen-mp57/</link>
		<comments>http://rackerhacker.com/2012/03/12/installing-xenserver-6-0-2-on-an-aopen-mp57/#comments</comments>
		<pubDate>Mon, 12 Mar 2012 17:00:56 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[virtualization]]></category>
		<category><![CDATA[xen]]></category>
		<category><![CDATA[xenserver]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=3163</guid>
		<description><![CDATA[Getting XenServer installed on some unusual platforms takes a bit of work and the AOpen MP57 is a challenging platform for a XenServer 6.0.2 installation. My MP57 box came with the i57QMx-vP motherboard. If yours came with something else, this post may or may not work for you. You'll need the XenServer 6 installation ISO [...]<p><a href="http://rackerhacker.com/2012/03/12/installing-xenserver-6-0-2-on-an-aopen-mp57/">Installing XenServer 6.0.2 on an AOpen MP57</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p><a href="http://rackerhacker.com/wp-content/uploads/2012/03/BBM-APN-MP57D.jpg"><img src="http://rackerhacker.com/wp-content/uploads/2012/03/BBM-APN-MP57D.jpg" alt="AOpen MP57" title="AOpen MP57" width="200" height="200" class="alignright size-full wp-image-3165" /></a>Getting XenServer installed on some unusual platforms takes a bit of work and the <a href="http://global.aopen.com/products_detail.aspx?Auno=3047">AOpen MP57</a> is a challenging platform for a XenServer 6.0.2 installation.</p>
<p>My MP57 box came with the i57QMx-vP motherboard.  If yours came with something else, this post may or may not work for you.</p>
<p>You'll need the <a href="https://www.citrix.com/lang/English/lp/lp_1688615.asp">XenServer 6 installation ISO</a> burned to a CD to get started.  Boot the CD in your MP57 and wait for the initial boot screen to appear.  Type <strong>safe</strong> at the prompt and press enter.  Go through the normal installation steps and reboot.</p>
<p>After the reboot, you'll notice that there's no video output for dom0.  Hop on another nearby computer and ssh to your XenServer installation using the root user and the password that you set during the installation process.  Open up <code>/boot/extlinux.conf</code> in your favorite text editor and make sure the <code>label xe</code> section looks like this:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">label xe
  # XenServer
  kernel mboot.c32
  append /boot/xen.gz mem=1024G dom0_max_vcpus=4 dom0_mem=752M lowmem_emergency_pool=1M crashkernel=64M@32M acpi=off console=vga --- /boot/vmlinuz-2.6-xen root=LABEL=root-aouozuoo ro xencons=hvc console=hvc0 console=tty0 vga=785 --- /boot/initrd-2.6-xen.img</pre></div></div>

<p>The <code>console=vga</code> adjustment ensures that the dom0 console is piped to the vga output and <code>acpi=off</code> fixes the lockup that will occur when the vga output is sent to your display.  I also removed <code>splash</code> and <code>quiet</code> from the kernel line so that I could see all of the boot messages in detail.</p>
<p><a href="http://rackerhacker.com/2012/03/12/installing-xenserver-6-0-2-on-an-aopen-mp57/">Installing XenServer 6.0.2 on an AOpen MP57</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2012/03/12/installing-xenserver-6-0-2-on-an-aopen-mp57/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The StartupBus stops at Rackspace</title>
		<link>http://rackerhacker.com/2012/03/11/the-startupbus-stops-at-rackspace/</link>
		<comments>http://rackerhacker.com/2012/03/11/the-startupbus-stops-at-rackspace/#comments</comments>
		<pubDate>Sun, 11 Mar 2012 17:00:29 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=3149</guid>
		<description><![CDATA[I helped welcome the folks on the StartupBus from SXSW as they arrived at Rackspace's headquarters last Friday. Here's a video sampling of the day's events: http://www.youtube.com/watch?v=ZfZPD2DrqkQ Want to participate in quirky stuff like this while serving customers and working on the latest technology? Become a Racker. The StartupBus stops at Rackspace is a post [...]<p><a href="http://rackerhacker.com/2012/03/11/the-startupbus-stops-at-rackspace/">The StartupBus stops at Rackspace</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p>I helped welcome the folks on the StartupBus from SXSW as they arrived at Rackspace's headquarters last Friday.  Here's a video sampling of the day's events:</p>
<p><a href="http://www.youtube.com/watch?v=ZfZPD2DrqkQ&#038;fmt=18">http://www.youtube.com/watch?v=ZfZPD2DrqkQ</a></p>
<p><a href="http://www.youtube.com/watch?v=ZfZPD2DrqkQ&#038;fmt=18"><img src="http://img.youtube.com/vi/ZfZPD2DrqkQ/default.jpg" width="130" height="97" border=0></a></p>
<p>Want to participate in quirky stuff like this while serving customers and working on the latest technology?  <a href="http://jobs.rackspace.com/">Become a Racker</a>.</p>
<p><a href="http://rackerhacker.com/2012/03/11/the-startupbus-stops-at-rackspace/">The StartupBus stops at Rackspace</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2012/03/11/the-startupbus-stops-at-rackspace/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Handy hints for using dtrace on the Mac</title>
		<link>http://rackerhacker.com/2012/03/10/handy-hints-for-using-dtrace-on-the-mac/</link>
		<comments>http://rackerhacker.com/2012/03/10/handy-hints-for-using-dtrace-on-the-mac/#comments</comments>
		<pubDate>Sat, 10 Mar 2012 18:49:59 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[dtrace]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[systemtap]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=3140</guid>
		<description><![CDATA[I'm a big fan of Linux tools which allow you to monitor things in great detail. Some of my favorites are strace, the systemtap tools, and sysstat. Finding tools similar to these on a Mac is a little more difficult. There's a great blog post from Brendan Gregg's blog that covers a lot of detail [...]<p><a href="http://rackerhacker.com/2012/03/10/handy-hints-for-using-dtrace-on-the-mac/">Handy hints for using dtrace on the Mac</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p>I'm a big fan of Linux tools which allow you to monitor things in great detail.  Some of my favorites are strace, the <a href="http://sourceware.org/systemtap/">systemtap</a> tools, and sysstat.  Finding tools similar to these on a Mac is a little more difficult.</p>
<p>There's a great blog post from Brendan Gregg's blog that covers a lot of detail around dtrace and its related tools:</p>
<ul>
<li><a href="http://dtrace.org/blogs/brendan/2011/10/10/top-10-dtrace-scripts-for-mac-os-x/">http://dtrace.org/blogs/brendan/2011/10/10/top-10-dtrace-scripts-for-mac-os-x/</a></li>
</ul>
<p>One of the handier tools is <code>iosnoop</code>.  It gives you a much easier to read (and easier to generate) view of the disk I/O on your Mac.  If you remember, I talked about how to do this in Linux in the <a href="/2010/12/07/tap-into-your-linux-system-with-systemtap/">systemtap</a> post as well as the post about <a href="/2008/03/11/hunting-down-elusive-sources-of-iowait/">finding elusive sources of iowait</a>.  This could give you a lot of handy information if you're staring at beachballs regularly while your disk drive churns.</p>
<p><a href="http://rackerhacker.com/2012/03/10/handy-hints-for-using-dtrace-on-the-mac/">Handy hints for using dtrace on the Mac</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2012/03/10/handy-hints-for-using-dtrace-on-the-mac/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Preparing for Red Hat Exams</title>
		<link>http://rackerhacker.com/2012/02/28/preparing-for-red-hat-exams/</link>
		<comments>http://rackerhacker.com/2012/02/28/preparing-for-red-hat-exams/#comments</comments>
		<pubDate>Tue, 28 Feb 2012 21:35:28 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[general advice]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[red hat]]></category>
		<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[virtualization]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=3107</guid>
		<description><![CDATA[I originally wrote this post for the Rackspace Blog but I've posted it here just in case anyone following my blog's feed finds it useful. Feel free to share your feedback! Getting yourself ready for any type of examination is usually a stressful experience that involves procrastination and some late nights leading up to the [...]<p><a href="http://rackerhacker.com/2012/02/28/preparing-for-red-hat-exams/">Preparing for Red Hat Exams</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p><em style="color: grey;">I originally wrote this post for the <a href="http://www.rackspace.com/blog/preparing-for-red-hat-exams/">Rackspace Blog</a> but I've posted it here just in case anyone following my blog's feed finds it useful.  Feel free to share your feedback!</em></p>
<p>Getting yourself ready for any type of examination is usually a stressful experience that involves procrastination and some late nights leading up to the test. Every time I take one, I always say to myself, “I’m really going to get ahead of this next time and study early. This last minute stuff is terrible.” But I always forget all of this as the next exam rolls around.</p>
<p>Quick note: As you read through the remainder of the post, you may wonder why some of it is a bit vague. Every Red Hat test taker is under a NDA to prevent disclosure of test information that may reduce the security of the exam itself. Penalties start with losing credit for the exams previously taken and they can escalate up to legal action. I hope you’ll understand why I’m not able to go into details about certain portions of the Red Hat examinations.</p>
<p>I’ve taken seven Red Hat exams already: two for the RHCE and five for the RHCA. These tests certainly aren’t easy, but there are some good guidelines and tips you can use to make your studying efforts less stressful and more productive. Without further ado, here are my recommendations for prospective Red Hat examinees:</p>
<h4>Build a flexible study environment</h4>
<p>This is critical. You’ll need some spare servers or some available virtual machines to practice the objectives on each exam. However, don’t feel like you need to spend the money on a Red Hat subscription to get your studying done. Most of the test objectives on the majority of exams can be completed with very similar Linux distributions, like Scientific Linux or CentOS. Look for a version of the distribution that is closest to what you’ll be tested on at exam time. Your study environment should meet some basic criteria:</p>
<ul>
<li>You should be able to quickly build and tear down servers or virtual machines</li>
<li>Keep the latency to your environment low to avoid getting frustrated</li>
<li>Use applications like VirtualBox, VMWare Fusion/Workstation to practice on your own computer</li>
<li>Consider using VMs from cloud providers if you’re under a time crunch</li>
</ul>
<p>Some exams may require some bare-metal access to the server itself (especially <a href="https://www.redhat.com/courses/ex442_red_hat_enterprise_system_monitoring_and_performance_tuning_expertise_exam/">EX442</a>), so keep that in mind when you’re looking for a good practice environment. You may need some specific network or storage setups for some exams (as with <a href="https://www.redhat.com/courses/ex436_red_hat_enterprise_clustering_and_storage_management_expertise_exam/">EX436</a>). If you’re not sure what you need, be sure to ask your instructor or someone else you know who has taken the exam already.</p>
<h4>Prioritize doing over reading</h4>
<p>The Red Hat exams are all hands-on, practical exams. You won’t find any essays or multiple-choice questions in these exams. Although the materials from Red Hat are full of good information, reading this information can only get you so far. You need to practice setting up the services on your own to be fully prepared for the test. If you’re not pressed for time, reading through the book can give you some details about the lab sequences, which you might miss by solely reading through labs themselves.</p>
<h4>Research the why, not the what, to remember</h4>
<p>This is especially important for the RHCA exam track. You may find that there is a ton of material to cover for the exam and that it’s difficult to remember each command to bring a certain service online or to repair a problem. Instead of thinking through the problem as “first, I do this, then I do this”, try to understand why each step is important in the first place.</p>
<p>Here’s a good example. I’ll be the first one to admit that Kerberos drives me crazy. I’ve even <a href="http://rackerhacker.com/2012/02/02/kerberos-for-haters/">written posts</a> about it. The commands seemed really archaic, the daemons didn’t make sense, and the lack of readline support in the Kerberos tools made me want to throw my computer out the window (come on, MIT!). I put my class materials aside, went to Google in a browser, and started researching Kerberos.</p>
<p>I read some of MIT’s documentation, ventured over to Wikipedia, and poked at some of the documentation within the Kerberos RPM packages. After a while, I began to realize how it all fit together. “Okay,” I thought to myself, “I need principals in a keytab to do these things, but I need to have a database for the admin stuff first.” Suddenly, the order of things in my head wasn’t just memorized any longer. The process of operations seemed to make logical sense because I fully understood how the pieces of a Kerberos infrastructure fit together.</p>
<p>If you start to get discouraged, take a break and learn more about why you’re doing what you’re doing. Once it becomes second nature, working through the problems on the exam becomes much easier.</p>
<h4>Lean on your available resources</h4>
<p>Don’t forget that there are other knowledgeable folks available to talk to when you get bogged down. Lean on other RHCE’s, RHCA’s, or experienced Linux users to get the answers or explanations you need. If you already have a Red Hat certification, head over to the <a href="https://certforums.redhat.com/login.php">Red Hat Certification Forums</a> and meet up with other examinees that are discussing test preparation.</p>
<p>Also, you’ll find some knowledgeable (but sometimes snarky or quirky) people on IRC who are eager to point you in the right direction. Try the #rhel, #centos, or #fedora channels if you’re struggling through the configuration of a certain service. Many Linux users may roll their eyes about it, but Twitter is also a pretty good way to reach out to people who have a lot of Linux experience.</p>
<h4>Summary</h4>
<p>Remember to lean on the knowledge of others, get hands-on with the test objectives and do your research when you’re frustrated. The exams from Red Hat are generally difficult and cover a lot of material, but with the right amount of preparation and determination you can pass the exams and get the certifications you want.</p>
<p><a href="http://rackerhacker.com/2012/02/28/preparing-for-red-hat-exams/">Preparing for Red Hat Exams</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2012/02/28/preparing-for-red-hat-exams/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Five years of rackerhacker.com</title>
		<link>http://rackerhacker.com/2012/02/14/five-years-of-rackerhacker-com/</link>
		<comments>http://rackerhacker.com/2012/02/14/five-years-of-rackerhacker-com/#comments</comments>
		<pubDate>Tue, 14 Feb 2012 14:45:43 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[fun]]></category>
		<category><![CDATA[rackspace]]></category>
		<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=3085</guid>
		<description><![CDATA[Today marks the fifth year that this blog has existed on the internet. I bought the domain on February 14th, 2007 and tossed together a quick WordPress installation (I can't even remember the version now!) to hold my notes that I was gathering at work. At the time, I had recently parted ways with a [...]<p><a href="http://rackerhacker.com/2012/02/14/five-years-of-rackerhacker-com/">Five years of rackerhacker.com</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p>Today marks the fifth year that this blog has existed on the internet.  I bought the domain on February 14th, 2007 and tossed together a quick WordPress installation (I can't even remember the version now!) to hold my notes that I was gathering at work.<br />
<div id="attachment_3092" class="wp-caption alignright" style="width: 310px"><a href="http://rackerhacker.com/wp-content/uploads/2012/02/birthday_cake.jpg"><img src="http://rackerhacker.com/wp-content/uploads/2012/02/birthday_cake-300x199.jpg" alt="Birthday Cake" title="Birthday Cake" width="300" height="199" class="size-medium wp-image-3092" /></a><p class="wp-caption-text">Photo credit: <a href='http://www.flickr.com/photos/spool32/5045502202/'>Will Clayton</a></p></div>At the time, I had recently parted ways with a very small internet startup and joined the ranks at <a href="http://rackspace.com/">Rackspace</a> as an entry-level Linux system administrator.  The abrupt change from "top dog at the startup" to "wow, I don't know anything about Linux" caught me by surprise and I was trying to stuff as much knowledge into my brain as quickly as I could.  My teammates at Rackspace were eager to show me the ropes of wrangling servers and supporting customers.</p>
<p>As I mentioned already, the blog started out just as a place to stuff my notes from the things I learned at work.  I figured that it would be nice to store it in a searchable format but it would also be great if I could link other people to certain posts if they needed more information to fix a problem.  It was a way to retain knowledge but yet give it back to the people around me who needed it.</p>
<p>The blog has hit 456 posts (this one is #457) and it's gone from a few page views per day to just over 20,000 per day.  Here are the top five most accessed posts (since I've been keeping stats):</p>
<ol>
<li><a href="/2008/11/02/syncing-an-iphone-with-a-new-mac-without-hassles/">Syncing an iPhone with a new Mac without hassles</a></li>
<li><a href="/2008/01/24/ip_conntrack-table-full-dropping-packet/">ip_conntrack: table full, dropping packet</a></li>
<li><a href="/2007/02/09/delete-single-iptables-rules/">Delete a single iptables rule</a></li>
<li><a href="/2007/01/24/increase-mysql-connection-limit/">Increase MySQL connection limit</a></li>
<li><a href="/2008/06/24/mysql-error-1040-too-many-connections/">MySQL Error 1040: too many connections</a></li>
</ol>
<p>I'd like to send out a big thanks to the people who read this blog, add comments (or complaints!), and suggest new topics.  You are the reason why I take the time to keep this blog going.</p>
<p><a href="http://rackerhacker.com/2012/02/14/five-years-of-rackerhacker-com/">Five years of rackerhacker.com</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2012/02/14/five-years-of-rackerhacker-com/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Looking back at the long road to becoming a Red Hat Certified Architect</title>
		<link>http://rackerhacker.com/2012/02/13/looking-back-at-the-long-road-to-becoming-a-red-hat-certified-architect/</link>
		<comments>http://rackerhacker.com/2012/02/13/looking-back-at-the-long-road-to-becoming-a-red-hat-certified-architect/#comments</comments>
		<pubDate>Mon, 13 Feb 2012 15:00:41 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[certifications]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[general advice]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[rackspace]]></category>
		<category><![CDATA[red hat]]></category>
		<category><![CDATA[rpm]]></category>
		<category><![CDATA[sysadmin]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=3058</guid>
		<description><![CDATA[The grades came back last Friday and I've passed the last exam in the requirements to become a Red Hat Certified Architect (RHCA). I was fortunate enough to be part of Rackspace's RHCA pilot program and we took our first exam back at the end of 2010. It's definitely a good feeling to be finished [...]<p><a href="http://rackerhacker.com/2012/02/13/looking-back-at-the-long-road-to-becoming-a-red-hat-certified-architect/">Looking back at the long road to becoming a Red Hat Certified Architect</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p>The grades came back last Friday and I've passed the last exam in the requirements to become a <a href="http://www.redhat.com/training/certifications/rhca/">Red Hat Certified Architect (RHCA)</a>.  I was fortunate enough to be part of Rackspace's RHCA pilot program and we took our first exam back at the end of 2010.  It's definitely a good feeling to be finished and I'm definitely ready to give back some knowledge to the readers of this blog.</p>
<p><strong>First things first:</strong> there are going to be many part of this post which probably aren't as specific as you'd like.  A lot of that is due to the NDA that all Red Hat examinees agree to when they take an exam.  We aren't allowed to talk about what was on the exam or our experiences during the exam.  If we do, penalties range from smaller things like losing certifications all the way up to serious stuff like legal action.  It goes without saying that I want to protect the security of the exams, I don't want to lose my certifications, and I don't want to hire a lawyer.  Please try to keep this in mind if you yearn for more specifics than I'm able to give.</p>
<p><strong>Red Hat Certified Engineer</strong><br />
The <a href="http://www.redhat.com/training/courses/ex200/examobjective">RHCSA</a> and <a href="http://www.redhat.com/training/courses/ex300/examobjective">RHCE</a> exams are the first step on the path to the RHCA.  You can't take any of the RHCA prerequisite exams without it.  These exams cover a really broad spectrum of material including apache configuration, NFS, iptables and mail services.  The two links above will take you to the exam objectives for each exam.</p>
<p>I've always recommended the RHCE exam for Linux administrators who are trying to sharpen their skills and get to the next level whether they use Red Hat or not.  The exam covers a lot of good material that makes a solid foundation for any Linux user without throwing in too many Red Hat-specific knowledge.</p>
<p>The exam (like all Red Hat exams) is fully practical.  There are no multiple choice questions or essays.  You'll have to meet all of the objectives by logging into a local Red Hat system and making the system do what it needs to do.</p>
<p>Quick tips for the RHCSA/RHCE exams:</p>
<ul>
<li>Keep your eye on the clock. Time can really get away from you if you get stuck in the weeds on a problem that should be relatively straightforward.</li>
<li>Leave time at the end to check your work.  When you set up a lot of services, it's inevitable that you might configure a service for one problem that breaks the functionality required by a problem you completed already.</li>
<li>Always reboot before you leave.  We all forget to use <code>chkconfig</code> when we're in a hurry.</li>
<li>Practice, practice, practice.  There's not one objective on this exam that you can't test in a VM on your own.</li>
</ul>
<p><strong>Red Hat Enterprise System Monitoring and Performance Tuning</strong><br />
Our group at Rackspace started off with <a href="http://www.redhat.com/training/courses/ex442/examobjective">EX442</a> and it was a very difficult way to start off the RHCA track.  Take a look at the objectives and you'll see that much of the exam is related to tweaking system performance and then monitoring that performance with graphs and raw data.  You'll have to turn a lot of knobs on the kernel and you'll need to know where to store these configurations so they'll be persistent.</p>
<p>In addition, the objective regarding TCP buffers and related settings is a real challenge.  You'll have to wrestle with some math that appears to be relatively simple, but can get confusing quickly.  Some of the settings can't really be checked to know if your setting is correct.  The objectives mention tuning disk scheduling -- you don't really have the time or tools to know if your setting is ideal.</p>
<p>Quick tips for EX442:</p>
<ul>
<li>Use the documentation available to you. Install the <code>kernel-doc</code> package while you practice and during the exam.</li>
<li>Be careful with your math.  You have a Linux machine in front of you!  Don't forget about <code>bc</code>.</li>
<li>Watch your units.  Know the difference between a kilobyte (KB) and a kibibyte (KiB).</li>
<li>Make comments in files where you adjust kernel configurations.  It will help you keep track of which question the kernel adjustment is meant to satisfy.</li>
</ul>
<p><strong>Red Hat Enterprise Storage Management</strong><br />
I'm surprised to say this now, but I actually enjoyed <a href="http://www.redhat.com/training/courses/ex436/examobjective">EX436</a>.  I've always used other clustering tools like heartbeat and pacemaker, but I've never had the need to use the Red Hat Cluster Suite.  Although RHCS definitely has a lot of quirks and rough edges, it's pretty solid once you get familiar with the GUI and command line tools.</p>
<p>You get the opportunity to mess around with some pretty useful technology like iSCSI, GFS, and clustered LVM.  These are things that you're probably already using or will be using soon in a large server environment.  The web interface for RHCS is quite peculiar and you may find yourself wanting to put your fist through the screen when you're staring down the endless animated GIFs when the cluster is syncing its configuration.  Do your best to be patient because you certainly don't want to short circuit the cluster sync.</p>
<p>Quick tips for EX436:</p>
<ul>
<li>Be patient.  You'll feel like the RHCS web interface is mocking you when you're pressed for time.</li>
<li>Watch the clock.  It's extremely easy to burn a lot of time on this exam if you get stuck on a particular problem.</li>
<li>Double check your entries in the web interface.  Make sure you're doing things in the right order and that you've set up the prerequisites before adding services to the cluster.  If you get it wrong, you could put your cluster into a weird state.</li>
<li>Use man pages.  If you don't mess with GFS a lot, the man pages will save you in a pinch.</li>
</ul>
<p><strong>Red Hat Enterprise Deployment and Systems Management</strong><br />
If there's one exam where time management is critical, it's <a href="http://www.redhat.com/training/courses/ex401/examobjective">EX401</a>.  Importing data into the Satellite Server takes quite a bit of time and there's almost nothing you can do to speed it up.  It probably goes without saying, but as with most long-running tasks, you'll want to run it in screen.  The last thing you'd ever want is to abort the import due to an errant click or CTRL-C (I did it while practicing -- it's aggravating).</p>
<p>There are other test objectives which you can either complete or partially complete while you wait for the import to finish.</p>
<p>Also, take the time to really dig into the Satellite Server web interface while your practicing for the exam.  Knowing where to find the most common configuration items will really save some time when you're in the exam.  You can sometimes get pretty bogged down in the interface so don't forget to use multiple tabs to keep your work organized.</p>
<p>I felt like this exam was the easiest out of the bunch since you could go back and test every single question with good time management.  <em>Did I mention how important time management was on this exam already?</em>  If I forgot to mention it earlier, be sure to focus on time management for this test.</p>
<p>Quick tips for EX401:</p>
<ul>
<li>Time management will make or break you on this test.  Keep an eye on the clock and make sure you've done absolutely every piece of the exam that you can while you wait for the server to do its work.</li>
<li>Scour the web interface.  Keep a mental map in your mind where the big chunks of configuration items are.</li>
<li>Go back and test everything.  If you manage your time well, you should have enough time to verify each and every objective on this exam.</li>
</ul>
<p><strong>Red Hat Enterprise Directory Services and Authentication</strong><br />
At first, <a href="http://www.redhat.com/training/courses/ex423/examobjective">EX423</a> looks pretty straightforward.  Red Hat's authentication configuration tools make LDAP authentication setup pretty easy.  However, this exam comes with a lot of curveballs.</p>
<p>The GUI interface for the Directory Services component is a little frustrating to use.  I found that the GUI stopped responding to keyboard input occasionally unless I clicked on another window and came back.  If you misconfigure the SSL certificates in the interface, your LDAP server is down for the count.  If you don't input the correct data into the setup scripts at the beginning, you might not notice it until much later when it's either too difficult to dig yourself out of the hole or it's too late to start over with a clean configuration.</p>
<p>I didn't feel pressed for time on this exam too much and that was pretty refreshing after taking the EX401 test.  It's extremely critical to watch what you type and click on this exam.  Some mistakes can be quickly corrected while others may require you to blow away the LDAP server configuration and re-provision the whole thing.</p>
<p>Quick tips for EX423:</p>
<ul>
<li>Always watch what you're typing.  A simple mistake can lead to confusion or bigger issues down the road.</li>
<li>Don't ignore the LDIF objectives.  As you practice, you'll find that manipulating LDIF files is a little more involved than you expected.</li>
<li>Practice starting over.  Throw out your Directory Services configuration and get the experience of what it's like to start over and get back in the game.</li>
</ul>
<p><strong>Red Hat Enterprise Security: Network Services</strong><br />
There's no sugar coating it -- <a href="http://www.redhat.com/training/courses/ex333/examobjective">EX333</a> is a beast.  It's a six hour exam broken into two three-hour chunks.  It covers a ton of material and I refer to it as "the RHCE on steroids."  You might argue that I thought it was hard since it was the last test and I was ready to be finished, but I really think this exam is a tough one.</p>
<p>Practicing for the Kerberos and DNS objectives was the hardest for me.  I just couldn't understand Kerberos, no matter how hard I tried.  The realization that I would really have to learn it soon set in.  I dug into the Kerberos design documentation on MIT's site, read the summaries on Wikipedia, and scoured the documentation available in the Kerberos RPM packages.  Once I understood <em>why</em> Kerberos is set up the way it is and <em>why</em> the security measures are present, everything began to come together.  I was able to remember the steps not because I was memorizing them, but because I understood how Kerberos worked.</p>
<p>When you're working through the DNS objectives, keep an eye out for punctuation.  I blew through a good 20 minutes in what seemed like the blink of an eye when I forgot a period in my TSIG key configuration while studying.  Make sure you use the resources available to you, like <code>system-config-bind</code> and sample configs in <code>/usr/share/doc/bind*/examples/</code>.  Get to know commands like <code>dig</code> really well.</p>
<p>If you're overwhelmed by OpenSSL's command line syntax, check out the <code>/etc/pki/tls/misc/CA</code> script.  There are some handy comments at the top of the script that explain how to use it.  You can also pluck OpenSSL commands right out of the script if you need to run them yourself.</p>
<ul>
<li>Don't just memorize.  Do some research to understand how everything fits together.</li>
<li>Manage your time.  DNS and Kerberos have lots of small nuances that can become time sinks when done incorrectly.</li>
<li>Use the available documentation and tools.  Try practicing without study materials so that you're forced to use the docs and tools available within the server.</li>
</ul>
<p><b>Ranking the exams</b><br />
A couple of folks on Twitter asked me to rank the exams from most difficult to least difficult.  Keep in mind that these are a little subjective since I was more familiar with some objectives than others for certain tests.</p>
<ul>
<li><b>EX333 - Enterprise Security: Network Services:</b> a tubload of material and a very long exam</li>
<li><b>EX442 - System Monitoring and Performance Tuning:</b> very difficult to check your work, lots of calculations</li>
<li><b>EX423 - Directory Services and Authentication:</b> not a lot of material to cover, but tons of curveballs</li>
<li><b>EX436 - Storage Management:</b> the web interface made things much easier, lots of documentation available</li>
<li><b>EX401 - Deployment and Systems Management:</b> every objective can be tested, I build RPM's already</li>
</ul>
<p><a href="http://rackerhacker.com/2012/02/13/looking-back-at-the-long-road-to-becoming-a-red-hat-certified-architect/">Looking back at the long road to becoming a Red Hat Certified Architect</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2012/02/13/looking-back-at-the-long-road-to-becoming-a-red-hat-certified-architect/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Installing Fedora 16 in XenServer</title>
		<link>http://rackerhacker.com/2012/02/11/installing-fedora-16-in-xenserver/</link>
		<comments>http://rackerhacker.com/2012/02/11/installing-fedora-16-in-xenserver/#comments</comments>
		<pubDate>Sun, 12 Feb 2012 03:39:11 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[kickstart]]></category>
		<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[xen]]></category>
		<category><![CDATA[xenserver]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=3039</guid>
		<description><![CDATA[Getting Fedora 16 working in XenServer isn't the easiest thing to do, but I've put together a repository on GitHub that should help. The repository contains a kickstart file along with some brief instructions to help with the installation. If you're ready to get started right now, just clone the repository: git clone git://github.com/rackerhacker/kickstarts.git kickstarts [...]<p><a href="http://rackerhacker.com/2012/02/11/installing-fedora-16-in-xenserver/">Installing Fedora 16 in XenServer</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p>Getting Fedora 16 working in XenServer isn't the easiest thing to do, but I've put together a <a href="https://github.com/rackerhacker/kickstarts">repository on GitHub</a> that should help.  The repository contains a kickstart file along with some brief instructions to help with the installation.  If you're ready to get started right now, just clone the repository:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">git clone git://github.com/rackerhacker/kickstarts.git kickstarts</pre></div></div>

<p>There are some big issues with Fedora 16 which cause problems for installations within XenServer:</p>
<ul>
<li>the installer sets up a console on something other than hvc0</li>
<li>anaconda won't start without being in serial mode</li>
<li>anaconda tries to use GPT partitions by default</li>
<li>grub2 is now standard, but it causes problems for older XenServer versions</li>
</ul>
<p>My kickstart works around the grub2 problem by throwing down an old-style grub configuration file and creating the proper symlinks.  This config will still be updated when you upgrade kernels (at least in Fedora 16).  It also sets up a very simple partitioning schema with one root and one swap partition.  A DOS partition table is used in lieu of a GPT partition table.</p>
<p>When you start the installation, be sure to review the <a href="https://github.com/rackerhacker/kickstarts/blob/master/Fedora%2016%20Minimal%20on%20XenServer%206/README.md">README.md</a> in the git repository.  It has some special instructions for boot options to meet the requirements of Fedora 16 and the kickstart file.</p>
<p><a href="http://rackerhacker.com/2012/02/11/installing-fedora-16-in-xenserver/">Installing Fedora 16 in XenServer</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2012/02/11/installing-fedora-16-in-xenserver/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Using OpenSSL&#039;s s_client command with web servers using Server Name Indication (SNI)</title>
		<link>http://rackerhacker.com/2012/02/07/using-openssls-s_client-command-with-web-servers-using-server-name-indication-sni/</link>
		<comments>http://rackerhacker.com/2012/02/07/using-openssls-s_client-command-with-web-servers-using-server-name-indication-sni/#comments</comments>
		<pubDate>Tue, 07 Feb 2012 14:07:41 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[ssl]]></category>
		<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=2998</guid>
		<description><![CDATA[One of the handiest tools in the OpenSSL toolbox is s_client. You can quickly view lots of details about the SSL certificates installed on a particular server and diagnose problems. For example, use this command to look at Google's SSL certificates: openssl s_client -connect encrypted.google.com:443 You'll see the chain of certificates back to the original [...]<p><a href="http://rackerhacker.com/2012/02/07/using-openssls-s_client-command-with-web-servers-using-server-name-indication-sni/">Using OpenSSL's s_client command with web servers using Server Name Indication (SNI)</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p>One of the handiest tools in the OpenSSL toolbox is <code>s_client</code>.  You can quickly view lots of details about the SSL certificates installed on a particular server and diagnose problems.  For example, use this command to look at Google's SSL certificates:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">openssl s_client -connect encrypted.google.com:443</pre></div></div>

<p>You'll see the chain of certificates back to the original certificate authority where Google bought its certificate at the top, a copy of their SSL certificate in plain text in the middle, and a bunch of session-related information at the bottom.</p>
<p>This works really well when a site has one SSL certificate installed per IP address (this used to be a hard requirement).  With <a href="http://en.wikipedia.org/wiki/Server_Name_Indication">Server Name Indication</a> (SNI), a web server can have multiple SSL certificates installed on the same IP address.  SNI-capable browsers will specify the hostname of the server they're trying to reach during the initial handshake process.  This allows the web server to determine the correct SSL certificate to use for the connection.</p>
<p>If you try to connect to rackerhacker.com with <code>s_client</code>, you'll find that you receive the default SSL certificate installed on my server and not the one for this site:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">$ openssl s_client -connect rackerhacker.com:443
Certificate chain
 0 s:/C=US/ST=Texas/L=San Antonio/O=MHTX Enterprises/CN=*.mhtx.net
   i:/C=US/O=SecureTrust Corporation/CN=SecureTrust CA
 1 s:/C=US/O=SecureTrust Corporation/CN=SecureTrust CA
   i:/C=US/O=Entrust.net/OU=www.entrust.net/CPS incorp. by ref. (limits liab.)/OU=(c) 1999 Entrust.net Limited/CN=Entrust.net Secure Server Certification Authority</pre></div></div>

<p>Add on the <code>-servername</code> argument and <code>s_client</code> will do the additional SNI negotiation step for you:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">$ openssl s_client -connect rackerhacker.com:443 -servername rackerhacker.com
Certificate chain
 0 s:/OU=Domain Control Validated/OU=PositiveSSL/CN=rackerhacker.com
   i:/C=GB/ST=Greater Manchester/L=Salford/O=Comodo CA Limited/CN=PositiveSSL CA
 1 s:/C=GB/ST=Greater Manchester/L=Salford/O=Comodo CA Limited/CN=PositiveSSL CA
   i:/C=US/ST=UT/L=Salt Lake City/O=The USERTRUST Network/OU=http://www.usertrust.com/CN=UTN-USERFirst-Hardware
 2 s:/C=US/ST=UT/L=Salt Lake City/O=The USERTRUST Network/OU=http://www.usertrust.com/CN=UTN-USERFirst-Hardware
   i:/C=SE/O=AddTrust AB/OU=AddTrust External TTP Network/CN=AddTrust External CA Root
 3 s:/C=SE/O=AddTrust AB/OU=AddTrust External TTP Network/CN=AddTrust External CA Root
   i:/C=SE/O=AddTrust AB/OU=AddTrust External TTP Network/CN=AddTrust External CA Root</pre></div></div>

<p>You may be asking yourself this question:</p>
<blockquote><p>Why doesn't the web server just use the <code>Host:</code> header that my browser sends already to figure out which SSL certificate to use?</p></blockquote>
<p>Keep in mind that the SSL negotiation must occur <b>prior</b> to sending the HTTP request through to the remote server.  That means that the browser and the server have to do the certificate exchange earlier in the process and the browser wouldn't get the opportunity to specify which site it's trying to reach.  SNI fixes that by allowing a <code>Host:</code> header type of exchange during the SSL negotiation process.</p>
<p><a href="http://rackerhacker.com/2012/02/07/using-openssls-s_client-command-with-web-servers-using-server-name-indication-sni/">Using OpenSSL's s_client command with web servers using Server Name Indication (SNI)</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2012/02/07/using-openssls-s_client-command-with-web-servers-using-server-name-indication-sni/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Kerberos-hater&#039;s guide to installing Kerberos</title>
		<link>http://rackerhacker.com/2012/02/05/the-kerberos-haters-guide-to-installing-kerberos/</link>
		<comments>http://rackerhacker.com/2012/02/05/the-kerberos-haters-guide-to-installing-kerberos/#comments</comments>
		<pubDate>Sun, 05 Feb 2012 21:03:52 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[kerberos]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[nis]]></category>
		<category><![CDATA[rackspace]]></category>
		<category><![CDATA[red hat]]></category>
		<category><![CDATA[rhca]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[sysadmin]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=2949</guid>
		<description><![CDATA[As promised in my earlier post entitled Kerberos for haters, I've assembled the simplest possible guide to get Kerberos up an running on two CentOS 5 servers. Also, I don't really hate Kerberos. It's a bit of an inside joke with my coworkers who are studying for some of the RHCA exams at Rackspace. The [...]<p><a href="http://rackerhacker.com/2012/02/05/the-kerberos-haters-guide-to-installing-kerberos/">The Kerberos-hater's guide to installing Kerberos</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p><a href="http://rackerhacker.com/wp-content/uploads/2012/02/haters_gonna_hate_elephhant.jpg"><img src="http://rackerhacker.com/wp-content/uploads/2012/02/haters_gonna_hate_elephhant-238x300.jpg" alt="Haters gonna hate - elephant" title="Haters gonna hate - elephant" width="171" height="216" class="alignright size-medium wp-image-2953" /></a>As promised in my earlier post entitled <a href="/2012/02/02/kerberos-for-haters/">Kerberos for haters</a>, I've assembled the simplest possible guide to get Kerberos up an running on two CentOS 5 servers.</p>
<p>Also, I don't really <em>hate</em> Kerberos.  It's a bit of an inside joke with my coworkers who are studying for some of the <a href="http://www.redhat.com/training/certifications/rhca/">RHCA</a> exams at Rackspace.  The additional security provided by Kerberos is quite good but the setup involves a lot of small steps.  If you miss one of the steps or if you get something done out of order, you may have to scrap the whole setup and start over unless you can make sense of the errors in the log files.  A lot of my dislikes for Kerberos comes from the number of steps required in the setup process and the difficulty in tracking down issues when they crop up.</p>
<p>To complete this guide, you'll need the following:</p>
<ul>
<li>two CentOS, Red Hat Enterprise Linux or Scientific Linux 5 servers or VM's</li>
<li>some patience</li>
</ul>
<p>Here's how I plan to name my servers:</p>
<ul>
<li><strong>kdc.example.com</strong> - the Kerberos KDC server at 192.168.250.2</li>
<li><strong>client.example.com</strong> - the Kerberos client at 192.168.250.3</li>
</ul>
<p><strong>CRITICAL STEP:</strong> Before getting started, ensure that both systems have their hostnames properly set and both systems have the hostnames and IP addresses of both systems in <code>/etc/hosts</code>.  Your server and client must be able to know the IP and hostname of the other system as well as themselves.</p>
<p>First off, we will need <a href="http://en.wikipedia.org/wiki/Network_Information_Service">NIS</a> working to serve up the user information for our client.  Install the NIS server components on the KDC server:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">[root@kdc ~]# yum install ypserv</pre></div></div>

<p>Set the NIS domain and set a static port for <code>ypserv</code> to make it easier to firewall off.  Edit <code>/etc/sysconfig/network</code> on the KDC server:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">NISDOMAINNAME=EXAMPLE.COM
YPSERV_ARGS=&quot;-p 808&quot;</pre></div></div>

<p>Manually set the NIS domain on the KDC server and add it to <code>/etc/yp.conf</code>:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">[root@kdc ~]# nisdomain EXAMPLE.COM
[root@kdc ~]# echo &quot;domain EXAMPLE.COM server kdc.example.com&quot; &gt;&gt; /etc/yp.conf</pre></div></div>

<p>Adjust <code>/var/yp/securenets</code> on the KDC server for additional security:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">[root@kdc ~]# echo &quot;255.0.0.0 127.0.0.0&quot; &gt;&gt; /var/yp/securenets
[root@kdc ~]# echo &quot;255.255.255.0 192.168.250.0&quot; &gt;&gt; /var/yp/securenets</pre></div></div>

<p>Start the NIS server and generate the NIS maps:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">[root@kdc ~]# /etc/init.d/ypserv start; chkconfig ypserv on
[root@kdc ~]# make -C /var/yp</pre></div></div>

<p>I usually like to prepare my iptables rules ahead of time so I ensure that it doesn't derail me later on.  Paste this into the KDC's terminal:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">iptables -N SERVICES
iptables -I INPUT -j SERVICES
iptables -A SERVICES -p tcp --dport 111 -j ACCEPT -m comment --comment &quot;rpc&quot;
iptables -A SERVICES -p udp --dport 111 -j ACCEPT -m comment --comment &quot;rpc&quot;
iptables -A SERVICES -p tcp --dport 808 -j ACCEPT -m comment --comment &quot;nis&quot;
iptables -A SERVICES -p udp --dport 808 -j ACCEPT -m comment --comment &quot;nis&quot;
iptables -A SERVICES -p tcp --dport 88 -j ACCEPT -m comment --comment &quot;kerberos&quot;
iptables -A SERVICES -p udp --dport 88 -j ACCEPT -m comment --comment &quot;kerberos&quot;
iptables -A SERVICES -p udp --dport 464 -j ACCEPT -m comment --comment &quot;kerberos&quot;
iptables -A SERVICES -p tcp --dport 749 -j ACCEPT -m comment --comment &quot;kerberos&quot;
/etc/init.d/iptables save</pre></div></div>

<p>We need our time in sync for Kerberos to work properly.  Install NTP on both nodes, start it, and ensure it comes up at boot time:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">[root@kdc ~]# yum -y install ntp &amp;&amp; chkconfig ntpd on &amp;&amp; /etc/init.d/ntpd start
[root@client ~]# yum -y install ntp &amp;&amp; chkconfig ntpd on &amp;&amp; /etc/init.d/ntpd start</pre></div></div>

<p>Now we're ready to set up Kerberos.  Start by installing some packages on the KDC:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">[root@kdc ~]# yum install krb5-server krb5-workstation</pre></div></div>

<p>We will need to make some edits to <code>/etc/krb5.conf</code> on the KDC to set up our KDC realm.  Ensure that the <code>default_realm</code> is set:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">default_realm = EXAMPLE.COM</pre></div></div>

<p>The <code>[realms]</code> section should look like this:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">[realms]
EXAMPLE.COM = {
	kdc = 192.168.250.2:88
	admin_server = 192.168.250.2:749
}</pre></div></div>

<p>The <code>[domain_realm]</code> section should look like this:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">[domain_realm]
kdc.example.com = EXAMPLE.COM
client.example.com = EXAMPLE.COM</pre></div></div>

<p>Add <code>validate = true</code> within the <code>pam { }</code> block of the <code>[appdefaults]</code> section:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">[appdefaults]
 pam = {
   validate = true</pre></div></div>

<p>Adjust <code>/var/kerberos/krb5kdc/kdc.conf</code> on the KDC:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">[realms]
EXAMPLE.COM = {
	master_key_type = des-hmac-sha1
	default_principal_flags = +preauth
}</pre></div></div>

<p>There's one last configuration file to edit on the KDC!  Ensure that <code>/var/kerberos/krb5kdc/kadm5.acl</code> looks like this:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">*/admin@EXAMPLE.COM	    *</pre></div></div>

<p>We're now ready to make a KDC database to hold our sensitive Kerberos data.  Create the database and set a good password which you can remember.  This command also stashes your password on the KDC so you don't have to enter it each time you start the KDC:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">kdb5_util create -r EXAMPLE.COM -s</pre></div></div>

<p>On the KDC, create a principal for the admin user as well as user1 (which we'll create shortly).  Also, export the admin details to the kadmind key tab.  You'll get some extra output after each one of these commands but I've snipped it to reduce the length of the post.</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">[root@kdc ~]# kadmin.local
kadmin.local:  addprinc root/admin
kadmin.local:  addprinc user1
kadmin.local:  ktadd -k /var/kerberos/krb5kdc/kadm5.keytab kadmin/admin
kadmin.local:  ktadd -k /var/kerberos/krb5kdc/kadm5.keytab kadmin/changepw
kadmin.local:  exit</pre></div></div>

<p>Let's start the Kerberos KDC and kadmin daemons:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">[root@kdc ~]# /etc/init.d/krb5kdc start; /etc/init.d/kadmin start
[root@kdc ~]# chkconfig krb5kdc on; chkconfig kadmin on</pre></div></div>

<p>Now that the administration work is done, let's create a principal for our KDC server and stick it in it's keytab:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">[root@kdc ~]# kadmin.local
kadmin.local:  addprinc -randkey host/kdc.example.com
kadmin.local:  ktadd host/kdc.example.com</pre></div></div>

<p>Transfer your <code>/etc/krb5.conf</code> from the KDC server to the client.  Hop onto the client server, install the Kerberos client package and add some host principals:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">[root@client ~]# yum install krb5-workstation
[root@client ~]# kadmin.local
kadmin.local:  addpinc --randkey host/client.example.com
kadmin.local:  ktadd host/kdc.example.com</pre></div></div>

<p>There aren't any daemons on the client side, so the configuration is pretty much wrapped up there for Kerberos.  However, we now need to tell both servers to use Kerberos for auth and your client servers needs to use NIS to get user data.</p>
<ul>
<li>On the KDC:
<ul>
<li>run <code>authconfig-tui</code></li>
<li>choose <b>Use Kerberos</b> from the second column</li>
<li>press <b>Next</b></li>
<li>don't edit the configuration (authconfig got the data from <code>/etc/krb.conf</code>)</li>
<li>press <b>OK</b></li>
</ul>
</li>
<li>On the client:
<ul>
<li>run <code>authconfig-tui</code></li>
<li>choose <b>Use NIS</b> and <b>Use Kerberos</b></li>
<li>press <b>Next</b></li>
<li>enter your NIS domain (EXAMPLE.COM) and NIS server (kdc.example.com or 192.168.250.2)</li>
<li>press <b>Next</b></li>
<li>don't edit the Kerberos configuration (authconfig got the data from <code>/etc/krb.conf</code>)</li>
<li>press <b>OK</b></li>
</ul>
</li>
</ul>
<p><b>Got NIS problems?</b>  If the NIS connection stalls on the client, ensure that you have the iptables rules present on the KDC that we added near the beginning of this guide.  Also, if you forgot to add <b>both</b> hosts to <b>both</b> servers' <code>/etc/hosts</code>, go do that now.</p>
<p>Let's make our test user on the KDC.  <b>Don't add this user to the client</b> -- we'll get the user information via NIS and authenticate via Kerberos shortly.  We'll also rebuild our NIS maps after adding the user:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">[root@kdc ~]# useradd user1
[root@kdc ~]# passwd user1
[root@kdc ~]# make -C /var/yp/</pre></div></div>

<p>On the client, see if you can get the password hash for the user1 account via NIS:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">[root@client ~]# ypcat -d EXAMPLE.COM -h kdc.example.com passwd | grep user1
user1:$1$sUlSTlCv$riK5El3z8N4y.mi5Fe3Q60:500:500::/home/user1:/bin/bash</pre></div></div>

<p>You can see why NIS isn't a good way to authenticate users.  Someone could easily pull the hash for any account and brute force the hash on their own server.  Go back to the KDC and lock out the user account:</p>
<pre>
[root@kdc ~]# usermod -p '!!' user1
</pre>
<p>Go back to the client and try to pull the password hash now:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">[root@client ~]# ypcat -d EXAMPLE.COM -h kdc.example.com passwd | grep user1
user1:!!:500:500::/home/user1:/bin/bash</pre></div></div>

<p>On the plus side, the user's password hash is now gone.  On the negative side, you've just prevented this user from logging in locally or via NIS. Don't worry, the user can log in via Kerberos now.  Let's prepare a home directory on the client for the user:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">[root@client ~]# mkdir /home/user1
[root@client ~]# cp -av /etc/skel/.bash* /home/user1/
[root@client ~]# chown -R user1:user1 /home/user1/</pre></div></div>

<p>Note: In a real-world scenario, you'd probably want to export this user's home directory via NFS so they didn't get a different home directory on every server.</p>
<p>While you're still on the client, try to log into the client via the user.  Use the password that you used when you created the user1 principal on the KDC.</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">[root@client ~]# ssh user1@localhost
user1@localhost's password:
[user1@client ~]$ whoami
user1</pre></div></div>

<p>List your Kerberos tickets and you should see one for your user principal:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">[user1@client ~]$ klist
Ticket cache: FILE:/tmp/krb5cc_500_fCKPnZ
Default principal: user1@EXAMPLE.COM
&nbsp;
Valid starting     Expires            Service principal
02/05/12 14:18:53  02/06/12 00:18:53  krbtgt/EXAMPLE.COM@EXAMPLE.COM
	renew until 02/05/12 14:18:53</pre></div></div>

<p>Your KDC should have a couple of lines in its <code>/var/log/krb5kdc.log</code> showing the authentication:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">Feb 05 14:18:53 kdc.example.com krb5kdc[4694](info): AS_REQ (12 etypes {18 17 16 23 1 3 2 11 10 15 12 13}) 192.168.250.3: ISSUE: authtime 1328473133, etypes {rep=16 tkt=16 ses=16}, user1@EXAMPLE.COM for krbtgt/EXAMPLE.COM@EXAMPLE.COM
Feb 05 14:18:53 kdc.example.com krb5kdc[4694](info): TGS_REQ (7 etypes {18 17 16 23 1 3 2}) 192.168.250.3: ISSUE: authtime 1328473133, etypes {rep=16 tkt=18 ses=18}, user1@EXAMPLE.COM for host/client.example.com@EXAMPLE.COM</pre></div></div>

<p>The first line shows that the client asked for a Authentication Server Request (AS_REQ) and the second line shows that the client then asked for a Ticket Granting Server Request (TGS_REQ).  In layman's terms, the client first asked for a ticket-granting ticket (TGT) so it could authenticate to other services.  When it actually tried to log in via <code>ssh</code> it asked for a ticket (and received it).</p>
<p><b>YOU JUST CONFIGURED KERBEROS!</b></p>
<p>From here, the sky's the limit.  Another popular implementation of Kerberos is encrypted NFSv4.  You can even go crazy and use <a href="http://wiki.centos.org/HowTos/HttpKerberosAuth">Kerberos with apache</a>.</p>
<p>Let me know if you have any questions about this post or if you spot any errors.  With this many steps, there's bound to be a typo or two in this guide.  Keep in mind that there are some obvious spots for network-level and service-level security improvements.  This guide was intended to give you the basics and it doesn't cover all of the security implications involved with a Kerberos implementation.</p>
<p><a href="http://rackerhacker.com/2012/02/05/the-kerberos-haters-guide-to-installing-kerberos/">The Kerberos-hater's guide to installing Kerberos</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2012/02/05/the-kerberos-haters-guide-to-installing-kerberos/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Get notifications instead of automatic updates in Scientific Linux</title>
		<link>http://rackerhacker.com/2012/02/04/get-notifications-instead-of-automatic-updates-in-scientific-linux/</link>
		<comments>http://rackerhacker.com/2012/02/04/get-notifications-instead-of-automatic-updates-in-scientific-linux/#comments</comments>
		<pubDate>Sat, 04 Feb 2012 19:01:54 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[scientific linux]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[yum]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=2928</guid>
		<description><![CDATA[Scientific Linux installations have a package called yum-autoupdate by default and the package contains two files: # rpm -ql yum-autoupdate /etc/cron.daily/yum-autoupdate /etc/sysconfig/yum-autoupdate The cron job contains the entire script to run automatic updates once a day and the configuration file controls its behavior. However, you can't get the same functionality as Fedora's yum-updatesd package where [...]<p><a href="http://rackerhacker.com/2012/02/04/get-notifications-instead-of-automatic-updates-in-scientific-linux/">Get notifications instead of automatic updates in Scientific Linux</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p>Scientific Linux installations have a package called <code>yum-autoupdate</code> by default and the package contains two files:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;"># rpm -ql yum-autoupdate
/etc/cron.daily/yum-autoupdate
/etc/sysconfig/yum-autoupdate</pre></div></div>

<p>The cron job contains the entire script to run automatic updates once a day and the configuration file controls its behavior.  However, you can't get the same functionality as Fedora's <code>yum-updatesd</code> package where you can receive notifications for updates rather than automatically updating the packages.</p>
<p>To get those notifications in Scientific Linux, just make two small edits to this portion of <code>/etc/cron.daily/yum-autoupdate</code>:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000;">173</span>           <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;    Starting Yum with command&quot;</span>
<span style="color: #000000;">174</span>           <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;     /usr/bin/yum -c <span style="color: #007800;">$TEMPCONFIGFILE</span> -e 0 -d 1 -y update&quot;</span>         
<span style="color: #000000;">175</span>   <span style="color: #000000; font-weight: bold;">fi</span>
<span style="color: #000000;">176</span>   <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>yum <span style="color: #660033;">-c</span> <span style="color: #007800;">$TEMPCONFIGFILE</span> <span style="color: #660033;">-e</span> <span style="color: #000000;">0</span> <span style="color: #660033;">-d</span> <span style="color: #000000;">1</span> <span style="color: #660033;">-y</span> update <span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #007800;">$TEMPFILE</span> <span style="color: #000000;">2</span><span style="color: #000000; font-weight: bold;">&gt;&amp;</span><span style="color: #000000;">1</span>
<span style="color: #000000;">177</span>   <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #660033;">-s</span> <span style="color: #007800;">$TEMPFILE</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span> ; <span style="color: #000000; font-weight: bold;">then</span></pre></div></div>

<p>Adjust the <code>update</code> commands to look like this:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000;">173</span>           <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;    Starting Yum with command&quot;</span>
<span style="color: #000000;">174</span>           <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;     /usr/bin/yum -c <span style="color: #007800;">$TEMPCONFIGFILE</span> -e 0 -d 1 -y check-update&quot;</span>         
<span style="color: #000000;">175</span>   <span style="color: #000000; font-weight: bold;">fi</span>
<span style="color: #000000;">176</span>   <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>yum <span style="color: #660033;">-c</span> <span style="color: #007800;">$TEMPCONFIGFILE</span> <span style="color: #660033;">-e</span> <span style="color: #000000;">0</span> <span style="color: #660033;">-d</span> <span style="color: #000000;">1</span> <span style="color: #660033;">-y</span> check-update <span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #007800;">$TEMPFILE</span> <span style="color: #000000;">2</span><span style="color: #000000; font-weight: bold;">&gt;&amp;</span><span style="color: #000000;">1</span>
<span style="color: #000000;">177</span>   <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #660033;">-s</span> <span style="color: #007800;">$TEMPFILE</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span> ; <span style="color: #000000; font-weight: bold;">then</span></pre></div></div>

<p>Since you won't be auto-updating with this script any longer, you may want to comment out the <code>EXCLUDE=</code> line in <code>/etc/sysconfig/yum-autoupdate</code> so that you'll receive notifications for all packages with updates.  Also, to avoid having your changes updated with a newer <code>yum-autoupdate</code> package later, add the package to your list of excluded packages in <code>/etc/yum.conf</code>.</p>
<p><a href="http://rackerhacker.com/2012/02/04/get-notifications-instead-of-automatic-updates-in-scientific-linux/">Get notifications instead of automatic updates in Scientific Linux</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2012/02/04/get-notifications-instead-of-automatic-updates-in-scientific-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Kerberos for haters</title>
		<link>http://rackerhacker.com/2012/02/02/kerberos-for-haters/</link>
		<comments>http://rackerhacker.com/2012/02/02/kerberos-for-haters/#comments</comments>
		<pubDate>Fri, 03 Feb 2012 04:29:32 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[kerberos]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[red hat]]></category>
		<category><![CDATA[rhca]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=2906</guid>
		<description><![CDATA[I'll be the first one to admit that Kerberos drives me a little insane. It's a requirement for two of the exams in Red Hat's RHCA certification track and I've been forced to learn it. It provides some pretty nice security features for large server environments. You get central single sign ons, encrypted authentication, and [...]<p><a href="http://rackerhacker.com/2012/02/02/kerberos-for-haters/">Kerberos for haters</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p>I'll be the first one to admit that Kerberos drives me a little insane.  It's a requirement for two of the exams in <a href="http://www.redhat.com/training/certifications/rhca/">Red Hat's RHCA certification track</a> and I've been forced to learn it.  It provides some pretty nice security features for large server environments.  You get central single sign ons, encrypted authentication, and bidirectional validation.  However, getting it configured can be a real pain due to some rather archaic commands and shells.</p>
<p>Here's Kerberos in a nutshell within a two-server environment:  One server is a Kerberos key distribution center (KDC) and the other is a Kerberos client.  The KDC has the list of users and their passwords.  Consider a situation where a user tries to ssh into the Kerberos client:</p>
<ul>
<li>sshd calls to pam to authenticate the user</li>
<li>pam calls to the KDC for a ticket granting ticket (TGT) to see if the user can authenticate</li>
<li>the KDC replies to the client with a TGT encrypted with the user's password</li>
<li>pam (on the client) tries to decrypt the TGT with the password that the user provided via ssh</li>
<li>if pam can decrypt the TGT, it knows the user is providing the right password</li>
</ul>
<p>Now that the client has a a TGT for that user, it can ask for tickets to access other network services.  What if the user who just logged in wants to access another Kerberized service in the environment?</p>
<ul>
<li>client calls the KDC and asks for a ticket to grant access to the other service</li>
<li>KDC replies with two copies of the ticket:
<ul>
<li>one copy is encrypted with the user's current TGT</li>
<li>a second copy is encrypted with the password of the network service the user wants to access</li>
</ul>
</li>
<li>the client can decrypt the ticket which was encrypted with the current TGT since it has the TGT already</li>
<li>client makes an authenticator by taking the decrypted ticket and encrypting it with a timestamp</li>
<li>client passes the authenticator and the second copy of the ticket it received from the KDC</li>
<li>the other network service decrypts the second copy of the ticket and verifies the password</li>
<li>the other network service uses the decrypted ticket to decrypt the authenticator it received from the client</li>
<li>if the timestamp looks good, the other network service allows the user access</li>
</ul>
<p>Okay, that's confusing.  Let's take it one step further.  Enabling pre-authentication requires that clients send a request containing a timestamp encrypted with the user's password prior to asking for a TGT.  Without this requirement, an attacker can ask for a TGT one time and then brute force the TGT offline.  Pre-authentication forces the client to send a timestamped request encrypted with the user's password back to the KDC before they can ask for a TGT.  This means the attacker is forced to try different passwords when encrypting the timestamp in the hopes that they'll get a TGT to work with eventually.  One would hope that you have something configured on the KDC to set off an alarm for multiple failed pre-authentication attempts.</p>
<p>Oh, but we can totally kick it up another notch.  What if an attacker is able to give a bad password to a client but they're also able to impersonate the KDC?  They could reply to the TGT request (as the KDC) with a TGT encrypted with whichever password they choose and get access to the client system.  Enabling mutual authentication stops this attack since it forces the client to ask the KDC for the client's own host principal password (this password is set when the client is configured to talk to the KDC).  The attacker shouldn't have any clue what that password is and the attack will be thwarted.</p>
<p>By this point, you're either saying "Oh man, I don't ever want to do this." or "How do I set up Kerberos?".  Stay tuned if you're in the second group.  I'll have a dead simple (or as close to dead simple as one can get with Kerberos) how-to on the blog shortly.</p>
<p>In the meantime, here are a few links for extra Kerberos bedtime reading:</p>
<ul>
<li><a href="http://en.wikipedia.org/wiki/Kerberos_(protocol)">Kerberos on Wikipedia</a></li>
<li><a href="http://www.kerberos.org/software/whykerberos.pdf">MIT's "Why Kerberos"</a> [PDF]</li>
<li><a href="http://learn-networking.com/network-security/how-kerberos-authentication-works">How Kerberos Authentication Works</a></li>
</ul>
<p><a href="http://rackerhacker.com/2012/02/02/kerberos-for-haters/">Kerberos for haters</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2012/02/02/kerberos-for-haters/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>OpenStack bleeding-edge Python packages are now available</title>
		<link>http://rackerhacker.com/2012/02/01/openstack-bleeding-edge-python-packages-are-now-available/</link>
		<comments>http://rackerhacker.com/2012/02/01/openstack-bleeding-edge-python-packages-are-now-available/#comments</comments>
		<pubDate>Wed, 01 Feb 2012 15:05:16 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[ipv6]]></category>
		<category><![CDATA[openstack]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=2890</guid>
		<description><![CDATA[I sometimes enjoy living on the edge occasionally and that sometimes means I keep up with OpenStack changes commit by commit. If you're in the same boat as I am, you may save some time by using my repository of bleeding-edge Python packages from the OpenStack projects: pypi.mhtx.net Python packages are updated moments after the [...]<p><a href="http://rackerhacker.com/2012/02/01/openstack-bleeding-edge-python-packages-are-now-available/">OpenStack bleeding-edge Python packages are now available</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p>I sometimes enjoy living on the edge occasionally and that sometimes means I keep up with OpenStack changes commit by commit.  If you're in the same boat as I am, you may save some time by using my repository of bleeding-edge Python packages from the OpenStack projects:</p>
<ul>
<li><a href="http://pypi.mhtx.net/">pypi.mhtx.net</a></li>
</ul>
<p>Python packages are updated moments after the commit is merged into the repositories under <a href="http://github.com/openstack">OpenStack's github account</a>.  </p>
<p>Although the packages will contain the latest code available, rest assured that the code has passed an initial code review (by humans), unit tests, and varying levels of functional or integrated testing.  There may still be a bug or two cropping up after that, so be aware of that as you utilize these packages.</p>
<p>The package versions utilize a standard format:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">[package]-[version]-[git commit count]-[short commit hash]</pre></div></div>

<p>If you need to check the git log up to that particular commit, just run <code>git log</code>:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">git log [short commit hash]</pre></div></div>

<p>Instructions for configuring <code>pip</code> or <code>easy_install</code> are provided <a href="http://pypi.mhtx.net/">within the repository</a>.</p>
<p>In addition, the repository is accessible via IPv4 and IPv6.</p>
<p><a href="http://rackerhacker.com/2012/02/01/openstack-bleeding-edge-python-packages-are-now-available/">OpenStack bleeding-edge Python packages are now available</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2012/02/01/openstack-bleeding-edge-python-packages-are-now-available/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Create a local PyPi repository using only mod_rewrite</title>
		<link>http://rackerhacker.com/2012/01/31/create-a-local-pypi-repository-using-only-mod_rewrite/</link>
		<comments>http://rackerhacker.com/2012/01/31/create-a-local-pypi-repository-using-only-mod_rewrite/#comments</comments>
		<pubDate>Wed, 01 Feb 2012 04:02:49 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[mod_rewrite]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[sysadmin]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=2861</guid>
		<description><![CDATA[Regular users of Python's package tools like pip or easy_install are probably familiar with the PyPi repository. It's a one-stop-shop to learn more about available Python packages and get them installed on your server. However, certain folks may find the need to host a local PyPi repository for their own packages. You may need it [...]<p><a href="http://rackerhacker.com/2012/01/31/create-a-local-pypi-repository-using-only-mod_rewrite/">Create a local PyPi repository using only mod_rewrite</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p>Regular users of Python's package tools like <a href="http://pypi.python.org/pypi/pip">pip</a> or <a href="http://pypi.python.org/pypi/setuptools">easy_install</a> are probably familiar with the <a href="http://pypi.python.org/pypi">PyPi</a> repository.  It's a one-stop-shop to learn more about available Python packages and get them installed on your server.</p>
<p>However, certain folks may find the need to host a local PyPi repository for their own packages.  You may need it to store Python code which you don't plan to release publicly or you may need to add proprietary patches to upstream Python packages.  Regardless of the reason to have it, a local PyPi repository is relatively easy to configure.</p>
<p>You'll need to start with a base directory for your PyPi repository.  For this example, I chose <code>/var/pypi</code>.  The directory structure should look something like this:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">/var/pypi/simple/[package_name]/[package_tarball]</pre></div></div>

<p>For a package like <code>pip</code>, you'd make a structure like this:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">/var/pypi/simple/pip/pip-1.0.2.tar.gz</pre></div></div>

<p>Once you have at least one package stored locally, it's time to configure apache.  Here's a snippet from the virtual host I configured:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">DocumentRoot /var/pypi/
ServerName pypi.example.com
&nbsp;
Options +Indexes
&nbsp;
RewriteEngine On
RewriteRule ^/robots.txt - [L]
RewriteRule ^/icons/.* - [L]
RewriteRule ^/index\..* - [L]
&nbsp;
RewriteCond /var/pypi/$1 !-f
RewriteCond /var/pypi/$1 !-d
RewriteRule ^/(.*)/?$ http://pypi.python.org/$1 [R,L]</pre></div></div>

<p>The last set of rewrite directives check to see if the request refers to an existing file or directory under your document root.  If it does, your server will reply with a directory listing or with the actual file to download.  If the directory or file doesn't exist, apache will send the client a redirection to the main PyPi site.</p>
<p>Reload your apache configuration to bring in your new changes.  Let's try to download the <code>pip</code> tarball from our local server in the example I mentioned above:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">$ curl -I http://pypi.example.com/simple/pip/
HTTP/1.1 200 OK
&nbsp;
$ curl -I http://pypi.example.com/simple/pip/pip-1.0.2.tar.gz
HTTP/1.1 200 OK</pre></div></div>

<p>I've obviously snipped a bit of the response above, but you can see that apache is responding with 200's since it has the directories and files that I was trying to retrieve via curl.  Let's try to get something we don't have locally, like <code>kombu</code>:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">$ curl -I http://pypi.example.com/simple/kombu/
HTTP/1.1 302 Found
Location: http://pypi.python.org/simple/kombu/</pre></div></div>

<p>Our local PyPi repository doesn't have <code>kombu</code> so it will refer our Python tools over to the official PyPi repository to get the listing of available package versions for <code>kombu</code>.</p>
<p>Now we need to tell <code>pip</code> to use our local repository.  Edit <code>~/.pip/pip.conf</code> and add:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">[global]
index-url = http://pypi.example.com/simple/</pre></div></div>

<p>If you'd rather use <code>easy_install</code>, edit <code>~/.pydistutils.cfg</code> and add:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">[easy_install]
index_url = http://pypi.example.com/simple/</pre></div></div>

<p>Once your tools are configured, try installing a package you have locally and try to install one that you know you won't have locally.  You can add <code>-v</code> to <code>pip install</code> to watch it retrieve different URL's to get the packages it needs.  If you spot any peculiar behavior or unexpected redirections, double-check your mod_rewrite rules in your apache configuration and check the spelling of your directories under your document root.</p>
<p><a href="http://rackerhacker.com/2012/01/31/create-a-local-pypi-repository-using-only-mod_rewrite/">Create a local PyPi repository using only mod_rewrite</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2012/01/31/create-a-local-pypi-repository-using-only-mod_rewrite/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting started with SELinux</title>
		<link>http://rackerhacker.com/2012/01/25/getting-started-with-selinux/</link>
		<comments>http://rackerhacker.com/2012/01/25/getting-started-with-selinux/#comments</comments>
		<pubDate>Thu, 26 Jan 2012 04:28:41 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[red hat]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[seliux]]></category>
		<category><![CDATA[sysadmin]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=2838</guid>
		<description><![CDATA[I used to be one of those folks who would install Fedora, CentOS, Scientific Linux, or Red Hat and disable SELinux during the installation. It always seemed like SELinux would get in my way and keep me from getting work done. Later on, I found that one of my servers (which I'd previously secured quite [...]<p><a href="http://rackerhacker.com/2012/01/25/getting-started-with-selinux/">Getting started with SELinux</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p>I used to be one of those folks who would install Fedora, CentOS, Scientific Linux, or Red Hat and disable SELinux during the installation.  It always seemed like SELinux would get in my way and keep me from getting work done.  </p>
<p>Later on, I found that one of my servers (which I'd previously secured quite thoroughly) had some rogue processes running that were spawned through httpd.  Had I actually been using SELinux in enforcing mode, those processes would have probably never even started.</p>
<p>If you're trying to get started with SELinux but you're not sure how to do it without completely disrupting your server's workflow, these tips should help:</p>
<p><b>Get some good reporting and monitoring</b><br />
Two of the most handy SELinux tools are <a href="https://fedorahosted.org/setroubleshoot/">setroubleshoot and setroubleshoot-server</a>.  If you're running a server without X, you can use <a href="/2011/09/15/receive-e-mail-reports-for-selinux-avc-denials/">my guide for configuring setroubleshoot-server</a>.  You will receive email alerts within seconds of an AVC denial and the emails should contain tips on how to resolve the denial if the original action should be allowed.  If the AVC denial caught something you didn't expect, you'll know about the potential security breach almost immediately.</p>
<p><b>Start out with SELinux in permissive mode</b><br />
If you're overly concerned about SELinux getting in your way, or if you're enabling SELinux on a server that has been running without SELinux since it was installed, start out with SELinux in permissive mode.  To make the change effective immediately, just run:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;"># setenforce 0
# getenforce
Permissive</pre></div></div>

<p>Edit <code>/etc/sysconfig/selinux</code> to make it persistent across reboots:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;"># This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#     enforcing - SELinux security policy is enforced.
#     permissive - SELinux prints warnings instead of enforcing.
#     disabled - No SELinux policy is loaded.
SELINUX=permissive</pre></div></div>

<p><b>Adjust booleans before adding your own custom modules</b><br />
There are a lot of booleans you can toggle to get the functionality you need without adding your own custom SELinux modules with <code>audit2allow</code>.  If you wanted to see all of the applicable booleans for <code>httpd</code>, just use <code>getsebool</code>:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;"># getsebool -a | grep httpd
httpd_builtin_scripting --&gt; on
httpd_can_check_spam --&gt; off
httpd_can_network_connect --&gt; on
httpd_can_network_connect_cobbler --&gt; off
httpd_can_network_connect_db --&gt; off
httpd_can_network_memcache --&gt; off
httpd_can_network_relay --&gt; on
httpd_can_sendmail --&gt; on
... and so on ...</pre></div></div>

<p>Toggling booleans is easy with <code>togglesebool</code>:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;"># togglesebool httpd_can_network_memcache
httpd_can_network_memcache: active</pre></div></div>

<p>Now <code>httpd</code> can talk to <code>memcache</code>.  You can also use <code>setsebool</code> if you want to be specific about your setting (this is good for scripts):</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;"># setsebool httpd_can_network_memcache on</pre></div></div>

<p><b>Tracking your history of AVC denials</b><br />
All of your AVC denals are logged by <code>auditd</code> in <code>/var/log/audit/audit.log</code> but it's not the easiest file to read and parse.  That's where <code>aureport</code> comes in:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;"># aureport --avc | tail -n 5
45. 01/24/2012 04:23:29 postdrop unconfined_u:system_r:httpd_t:s0 4 fifo_file getattr system_u:object_r:postfix_public_t:s0 denied 1061
46. 01/24/2012 04:23:29 postdrop unconfined_u:system_r:httpd_t:s0 2 fifo_file write system_u:object_r:postfix_public_t:s0 denied 1062
47. 01/24/2012 04:23:29 postdrop unconfined_u:system_r:httpd_t:s0 2 fifo_file open system_u:object_r:postfix_public_t:s0 denied 1062
48. 01/24/2012 14:01:58 sendmail unconfined_u:system_r:httpd_t:s0 160 process setrlimit unconfined_u:system_r:httpd_t:s0 denied 1123
49. 01/24/2012 14:01:58 postdrop unconfined_u:system_r:httpd_t:s0 4 dir search system_u:object_r:postfix_public_t:s0 denied 1124</pre></div></div>

<p><b>Summary</b><br />
There's no need to be scared of or be annoyed by SELinux in your server environment.  While it takes some getting used to (and what new software doesn't?), you'll have an extra layer of security and access restrictions which should let you sleep a little better at night.</p>
<p><a href="http://rackerhacker.com/2012/01/25/getting-started-with-selinux/">Getting started with SELinux</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2012/01/25/getting-started-with-selinux/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>XenServer 6: Storage repository on software RAID</title>
		<link>http://rackerhacker.com/2012/01/16/xenserver-6-storage-repository-on-software-raid/</link>
		<comments>http://rackerhacker.com/2012/01/16/xenserver-6-storage-repository-on-software-raid/#comments</comments>
		<pubDate>Mon, 16 Jan 2012 15:00:21 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[lvm]]></category>
		<category><![CDATA[mdadm]]></category>
		<category><![CDATA[raid]]></category>
		<category><![CDATA[xen]]></category>
		<category><![CDATA[xenserver]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=2777</guid>
		<description><![CDATA[Although Citrix recommends against using software RAID with XenServer due to performance issues, I've had some pretty awful experiences with hardware RAID cards over the last few years. In addition, the price of software RAID makes it a very desirable solution. Before you get started, go through the steps to disable GPT. That post also [...]<p><a href="http://rackerhacker.com/2012/01/16/xenserver-6-storage-repository-on-software-raid/">XenServer 6: Storage repository on software RAID</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p>Although Citrix recommends against using software RAID with XenServer due to performance issues, I've had some pretty awful experiences with hardware RAID cards over the last few years.  In addition, the price of software RAID makes it a very desirable solution.</p>
<p><strong>Before you get started,</strong> <a href="http://rackerhacker.com/2012/01/13/xenserver-6-disable-gpt-and-get-a-larger-root-partition/">go through the steps to disable GPT</a>.  That post also explains an optional adjustment to get a larger root partition (which I would recommend).  <em>You cannot complete the steps in this post if your XenServer installation uses GPT.</em></p>
<p>You should have three partitions on your first disk after the installation:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;"># fdisk -l /dev/sda
-- SNIP --
   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        2611    20971520   83  Linux
/dev/sda2            2611        5222    20971520   83  Linux
/dev/sda3            5222       19457   114345281   8e  Linux LVM</pre></div></div>

<p>Here's a quick explanation of your partitions:</p>
<ul>
<li><b>/dev/sda1:</b> the XenServer root partition</li>
<li><b>/dev/sda2:</b> XenServer uses this partition for temporary space during upgrades</li>
<li><b>/dev/sda3:</b> your storage repository should be in this logical volume</li>
</ul>
<p>We need to replicate the same partition structure across each of your drives and the software RAID volume will span the across the third partition on each disk.  Copying the partition structure from disk to disk is done easily with <code>sfdisk</code>:</p>
<p><span style="color: #D42020;"><b>WHOA THERE! NO TURNING BACK!</b> This step is destructive! If your other disks have any data on them, this step will make it (relatively) impossible to retrieve data on those disks again.  Back up any data on the other disks in your XenServer machine before running these next commands.</span></p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">sfdisk -d /dev/sda | sfdisk --force /dev/sdb
sfdisk -d /dev/sda | sfdisk --force /dev/sdc
sfdisk -d /dev/sda | sfdisk --force /dev/sdd</pre></div></div>

<p>If you have only two disks, stop with <code>/dev/sdb</code> and you'll be making a RAID 1 array.  My machine has four disks and I'll be making a RAID 10 array.</p>
<p>We need to destroy the main storage repository, but we need to unplug the physical block device first.  Get the storage repository uuid first, then use it to find the corresponding physical block device.  Once the physical block device is unplugged, the storage repository can be destroyed:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;"># xe sr-list name-label=Local\ storage | head -1
uuid ( RO)                : 75264965-f981-749e-0f9a-e32856c46361
# xe pbd-list sr-uuid=75264965-f981-749e-0f9a-e32856c46361 | head -1
uuid ( RO)                  : ff7e9656-c27c-1889-7a6d-687a561f0ad0
# xe pbd-unplug uuid=ff7e9656-c27c-1889-7a6d-687a561f0ad0 
# xe sr-destroy uuid=75264965-f981-749e-0f9a-e32856c46361</pre></div></div>

<p>All of the LVM data from <code>/dev/sda3</code> should now be gone:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;"># lvdisplay &amp;&amp; vgdisplay &amp;&amp; pvdisplay
#</pre></div></div>

<p>Change the third partition on each physical disk to be a software RAID partition type:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">echo -e &quot;t\n3\nfd\nw\n&quot; | fdisk /dev/sda
echo -e &quot;t\n3\nfd\nw\n&quot; | fdisk /dev/sdb
echo -e &quot;t\n3\nfd\nw\n&quot; | fdisk /dev/sdc
echo -e &quot;t\n3\nfd\nw\n&quot; | fdisk /dev/sdd</pre></div></div>

<p>Stop here and reboot your XenServer box to pick up the new partition changes.  Once the server comes back from the reboot, start up a software RAID volume with <code>mdadm</code>:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">// RAID 1 for two drives
mdadm --create /dev/md0 -l 1 -n 2 /dev/sda3 /dev/sdb3
// RAID 10 for four drives
mdadm --create /dev/md0 -l 10 -n 4 /dev/sda3 /dev/sdb3 /dev/sdc3 /dev/sdd3</pre></div></div>

<p>Check to see that your RAID array is building:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;"># cat /proc/mdstat 
Personalities : [raid10] 
md0 : active raid10 sdd3[3] sdc3[2] sdb3[1] sda3[0]
      228690432 blocks 64K chunks 2 near-copies [4/4] [UUUU]
      [&gt;....................]  resync =  0.3% (694272/228690432) finish=16.4min speed=231424K/sec</pre></div></div>

<p>Although you don't have to wait for the resync to complete, just be aware that XenServer doesn't do well with a lot of disk I/O within dom0.  You may notice unusually slow performance in dom0 until it finishes.  Save the array's configuration for reboots:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">mdadm --detail --scan &gt; /etc/mdadm.conf</pre></div></div>

<p>Edit the <code>/etc/mdadm.conf</code> file and append <code>auto=yes</code> to the end of the line (but leave everything on one line):</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">ARRAY /dev/md0 level=raid10 num-devices=4 metadata=0.90 \
  UUID=2876748c:5117eed5:ce4d62d3:9592bd84 auto=yes</pre></div></div>

<p>Create a new storage repository on the RAID volume with thin provisioning (thanks to <a href="http://www.scriptkiddie.org/blog/2010/06/20/xenserver-5-6-thin-provisioning-with-ext3/">Spherical Chicken</a> for the command):</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">xe sr-create content-type=user type=ext device-config:device=/dev/md0 shared=false name-label=&quot;Local storage&quot;</pre></div></div>

<p>This command takes some time to complete since it makes logical volumes and then makes an ext3 filesystem for the new storage repository.  Bigger RAID arrays will take more time and it's guaranteed to take longer than you'd expect if your RAID array is still building.  As soon as it completes, you'll be given the uuid of your new storage repository and it should appear within the XenCenter interface.</p>
<p>TIP: If you run into any problems during reboots, open <code>/boot/extlinux.conf</code> and remove <code>splash</code> and <code>quiet</code> from the <code>label xe</code> boot section.  This removes the framebuffer during boot-up and it causes a lot more output to be printed to the console.  It won't affect the display once your XenServer box has fully booted.</p>
<p><a href="http://rackerhacker.com/2012/01/16/xenserver-6-storage-repository-on-software-raid/">XenServer 6: Storage repository on software RAID</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2012/01/16/xenserver-6-storage-repository-on-software-raid/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>XenServer 6: Disable GPT and get a larger root partition</title>
		<link>http://rackerhacker.com/2012/01/13/xenserver-6-disable-gpt-and-get-a-larger-root-partition/</link>
		<comments>http://rackerhacker.com/2012/01/13/xenserver-6-disable-gpt-and-get-a-larger-root-partition/#comments</comments>
		<pubDate>Fri, 13 Jan 2012 15:00:10 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[xen]]></category>
		<category><![CDATA[xenserver]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=2741</guid>
		<description><![CDATA[XenServer 6 is a solid virtualization platform, but the installer doesn't give you many options for customized configurations. By default, it installs with a 4GB root partition and uses GUID Partition Tables (GPT). GPT is new in XenServer 6. I'd rather use MBR partition tables and get a larger root partition. If you want to [...]<p><a href="http://rackerhacker.com/2012/01/13/xenserver-6-disable-gpt-and-get-a-larger-root-partition/">XenServer 6: Disable GPT and get a larger root partition</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.citrix.com/English/ps2/products/product.asp?contentID=683148&#038;ntref=prod_top">XenServer 6</a> is a solid virtualization platform, but the installer doesn't give you many options for customized configurations.  By default, it installs with a 4GB root partition and uses <a href="http://en.wikipedia.org/wiki/GUID_Partition_Table">GUID Partition Tables (GPT)</a>.  GPT is new in XenServer 6.</p>
<p>I'd rather use <a href="http://en.wikipedia.org/wiki/Master_boot_record">MBR partition tables</a> and get a larger root partition.  If you want to make these adjustments in your XenServer 6 installation, follow these steps after booting into the <a href="http://www.citrix.com/lang/English/lp/lp_1688615.asp">XenServer 6 install disc</a>:</p>
<p><a href="http://rackerhacker.com/wp-content/uploads/2012/01/01.jpg"><img src="http://rackerhacker.com/wp-content/uploads/2012/01/01-300x220.jpg" alt="xenserver_install_01" title="xenserver_install_01" width="300" height="220" class="alignleft size-medium wp-image-2744" /></a><br />
When the installer initially boots, press F2 to access the advanced installation options.<br />
<br style="clear: both;" /> </p>
<p><a href="http://rackerhacker.com/wp-content/uploads/2012/01/02.jpg"><img src="http://rackerhacker.com/wp-content/uploads/2012/01/02-300x220.jpg" alt="xenserver_install_02" title="xenserver_install_02" width="300" height="220" class="alignleft size-medium wp-image-2747" /></a><br />
Type <code>shell</code> and press enter.  The installer should begin booting into a pre-installation shell where you can make your adjustments.<br />
<br style="clear: both;" /></p>
<p><a href="http://rackerhacker.com/wp-content/uploads/2012/01/04.jpg"><img src="http://rackerhacker.com/wp-content/uploads/2012/01/04-300x164.jpg" alt="" title="xenserver_install_04" width="300" height="164" class="alignleft size-medium wp-image-2761" /></a><br />
Once you've booted into the pre-installation shell, type <code>vi /opt/xensource/installer/constants.py</code> and press enter.<br />
<br style="clear: both;" /></p>
<p><a href="http://rackerhacker.com/wp-content/uploads/2012/01/05.jpg"><img src="http://rackerhacker.com/wp-content/uploads/2012/01/05-300x164.jpg" alt="xenserver_install_05" title="xenserver_install_05" width="300" height="164" class="alignleft size-medium wp-image-2765" /></a><br />
Change <code>GPT_SUPPORT = True</code> to <code>GPT_SUPPORT = False</code> to disable GPT and use MBR partition tables.  Adjust the value of <code>root_size</code> from 4096 (the default) to a larger number to get a bigger root partition.  The size is specified in MB, so 4096 is 4GB.  Save the file and exit <code>vim</code>.<br />
<br style="clear: both;" /></p>
<p><a href="http://rackerhacker.com/wp-content/uploads/2012/01/06.jpg"><img src="http://rackerhacker.com/wp-content/uploads/2012/01/06-300x164.jpg" alt="" title="xenserver_install_06" width="300" height="164" class="alignleft size-medium wp-image-2768" /></a><br />
Type <code>exit</code> and the installer should start.<br />
<br style="clear: both;" /></p>
<p>Once the installation is complete, you should have a bigger root partition on a MBT partition table:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;"># df -h /
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda1              20G  1.8G   17G  10% /
# fdisk -l /dev/sda
&nbsp;
Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
&nbsp;
   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        2611    20971520   83  Linux
/dev/sda2            2611        5222    20971520   83  Linux
/dev/sda3            5222       19457   114345281   8e  Linux LVM</pre></div></div>

<p><a href="http://rackerhacker.com/2012/01/13/xenserver-6-disable-gpt-and-get-a-larger-root-partition/">XenServer 6: Disable GPT and get a larger root partition</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2012/01/13/xenserver-6-disable-gpt-and-get-a-larger-root-partition/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Fight SOPA &amp; PIPA</title>
		<link>http://rackerhacker.com/2012/01/12/fight-sopa-and-pipa/</link>
		<comments>http://rackerhacker.com/2012/01/12/fight-sopa-and-pipa/#comments</comments>
		<pubDate>Thu, 12 Jan 2012 13:36:38 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[sopa]]></category>
		<category><![CDATA[sysadmin]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=2816</guid>
		<description><![CDATA[Get informed about what the US government is trying to accomplish with SOPA and PIPA. Get involved and do what you can to prevent it from moving any further. WordPress > Help Stop SOPA/PIPA Reddit - SOPA Stop American Censorship Wikipedia - Stop Online Piracy Act EFF - Take Action Why Rackspace opposes the Stop [...]<p><a href="http://rackerhacker.com/2012/01/12/fight-sopa-and-pipa/">Fight SOPA &#038; PIPA</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p><a href="http://rackerhacker.com/wp-content/uploads/2012/01/sopacantspelldns.jpg"><img src="http://rackerhacker.com/wp-content/uploads/2012/01/sopacantspelldns.jpg" alt="SOPA - M. Chairman, with all due respect, you can&#039;t even spell DNS." title="SOPA - M. Chairman, with all due respect, you can&#039;t even spell DNS." width="625" height="374" class="alignnone size-full wp-image-2817" /></a></p>
<p>Get informed about what the US government is trying to accomplish with SOPA and PIPA.  Get involved and do what you can to prevent it from moving any further.</p>
<ul>
<li><a href="http://wordpress.org/news/2012/01/help-stop-sopa-pipa/">WordPress > Help Stop SOPA/PIPA</a></li>
<li><a href="http://reddit.com/r/sopa">Reddit - SOPA</a></li>
<li><a href="http://americancensorship.org/">Stop American Censorship</a></li>
<li><a href="http://en.wikipedia.org/wiki/Stop_Online_Piracy_Act">Wikipedia - Stop Online Piracy Act</a></li>
<li><a href="https://action.eff.org/o/9042/p/dia/action/public/?action_KEY=8173">EFF - Take Action</a></li>
<li><a href="http://www.rackspace.com/cloud/blog/2011/12/24/why-rackspace-opposes-the-%E2%80%9Cstop-online-piracy-act%E2%80%9D/">Why Rackspace opposes the Stop Online Piracy Act</a></li>
<li><a href="http://www.mozilla.org/sopa/">Mozilla - Protect The Internet</a></li>
</ul>
<p>You may need a little humor after all of that reading.  Head on over to <a href="http://knowyourmeme.com/memes/events/protect-ip-act-stop-online-piracy-act">Know Your Meme</a> (warning: NSFW language in certain areas) for a laugh.</p>
<p><a href="http://rackerhacker.com/2012/01/12/fight-sopa-and-pipa/">Fight SOPA &#038; PIPA</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2012/01/12/fight-sopa-and-pipa/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Native IPv6 connectivity in Mikrotik&#039;s RouterOS</title>
		<link>http://rackerhacker.com/2012/01/11/native-ipv6-connectivity-in-mikrotiks-routeros/</link>
		<comments>http://rackerhacker.com/2012/01/11/native-ipv6-connectivity-in-mikrotiks-routeros/#comments</comments>
		<pubDate>Wed, 11 Jan 2012 13:30:07 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[ipv6]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mikrotik]]></category>
		<category><![CDATA[network]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=2720</guid>
		<description><![CDATA[It's no secret that I'm a big fan of the Routerboard devices and the RouterOS software from Mikrotik that runs on them. The hardware is solid, the software is stable and feature-rich, and I found a great vendor that ships quickly. I recently added a RB493G (~ $230 USD) to sit in front of a [...]<p><a href="http://rackerhacker.com/2012/01/11/native-ipv6-connectivity-in-mikrotiks-routeros/">Native IPv6 connectivity in Mikrotik's RouterOS</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p>It's no secret that I'm a big fan of the <a href="http://routerboard.com/">Routerboard</a> devices and the <a href="http://www.mikrotik.com/software.html">RouterOS software from Mikrotik</a> that runs on them.  The hardware is solid, the software is stable and feature-rich, and I found a <a href="http://www.roc-noc.com/">great vendor</a> that ships quickly.</p>
<p>I recently added a <a href="http://routerboard.com/RB493G">RB493G</a> (<a href="http://www.roc-noc.com/mikrotik/routerboard/rb493g-complete.html">~ $230 USD</a>) to sit in front of a pair of colocated servers.  The majority of the setup routine was the same as with my previous devices except for the IPv6 configuration.</p>
<p>In the past, I've set up IPv6 tunnels with <a href="http://ipv6.he.net/">Hurricane Electric</a> and it's been mostly a cut-and-paste operation from the sample configuration in their IPv6 tunnel portal.  Setting up native IPv6 involved a little more legwork.</p>
<p>If your provider will give you two /64's or an entire /48, getting IPv6 connectivity for your WAN/LAN interfaces is simple.  However, if you can only get one /64, you'll have to see if your provider can route it to you via your Mikrotik's <a href="http://en.wikipedia.org/wiki/Link-local_address#IPv6">link local</a> interface (I wouldn't recommend this for many reasons).</p>
<p>I split my Mikrotik into two interfaces: wan and lanbridge.  The lanbridge bridge joins all of the LAN ethernet ports (ether2-9 on the RB493G) and the wan interface connects to the upstream switch.</p>
<p>My configuration:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">/ipv6 address
add address=2001:DB8:0:1::2/64 advertise=yes disabled=no eui-64=no interface=wan
add address=2001:DB8:0:2::1/64 advertise=yes disabled=no eui-64=no interface=lanbridge
/ipv6 route
add disabled=no distance=1 dst-address=::/0 gateway=2001:DB8:0:1::1 scope=30 \
  target-scope=10
/ipv6 nd
add advertise-dns=no advertise-mac-address=yes disabled=no hop-limit=64 \ 
  interface=all managed-address-configuration=no mtu=unspecified \
  other-configuration=no ra-delay=3s ra-interval=3m20s-10m ra-lifetime=30m \ 
  reachable-time=unspecified retransmit-interval=unspecified
/ipv6 nd prefix default
set autonomous=yes preferred-lifetime=1w valid-lifetime=4w2d</pre></div></div>

<p>Explanation:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">/ipv6 address
add address=2001:DB8:0:1::2/64 advertise=yes disabled=no eui-64=no interface=wan
add address=2001:DB8:0:2::1/64 advertise=yes disabled=no eui-64=no interface=lanbridge</pre></div></div>

<p>These two lines configure the IPv6 addresses for the firewall's interfaces.  My provider's router holds the 2001:DB8:0:1::1/64 address and routes the remainder of that /64 to me via 2001:DB8:0:1::2/64.  The second /64 is on the lanbridge interface and my LAN devices take their IP addresses from that block.  My provider routes that second /64 to me via the 2001:DB8:0:1::2/64 IP on my wan interface.</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">/ipv6 route
add disabled=no distance=1 dst-address=::/0 gateway=2001:DB8:0:1::1 scope=30 \
  target-scope=10</pre></div></div>

<p>I've set a <a href="http://tldp.org/HOWTO/html_single/Linux+IPv6-HOWTO/#AEN1083">gateway</a> for IPv6 traffic so that the Mikrotik knows where to send internet-bound IPv6 traffic (in this case, to my ISP's core router).</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">/ipv6 nd
add advertise-dns=no advertise-mac-address=yes disabled=no hop-limit=64 \ 
  interface=lanbridge managed-address-configuration=no mtu=unspecified \
  other-configuration=no ra-delay=3s ra-interval=3m20s-10m ra-lifetime=30m \ 
  reachable-time=unspecified retransmit-interval=unspecified
/ipv6 nd prefix default
set autonomous=yes preferred-lifetime=1w valid-lifetime=4w2d</pre></div></div>

<p>These last two lines configure the <a href="http://en.wikipedia.org/wiki/Neighbor_Discovery_Protocol">neighbor discovery</a> on my lanbridge interface.  This allows my LAN devices to do <a href="http://en.wikipedia.org/wiki/IPv6#Stateless_address_autoconfiguration_.28SLAAC.29">stateless autoconfiguration</a> (which gives them an IPv6 address as well as the gateway).</p>
<p>Want to read up on IPv6?</p>
<ul>
<li><a href="http://tldp.org/HOWTO/html_single/Linux+IPv6-HOWTO/">Linux IPv6 HOWTO</a></li>
<li><a href="http://en.wikipedia.org/wiki/IPv6">IPv6 on Wikipedia</a></li>
<li><a href="http://www.roesen.org/files/ipv6_cheat_sheet.pdf">IPv6 Cheat Sheet</a> [PDF]</li>
<li><a href="http://www.ripe.net/lir-services/resource-management/number-resources/ipv6/ipv6-subnetting-card">IPv6 Subnetting Card</a></li>
</ul>
<p><a href="http://rackerhacker.com/2012/01/11/native-ipv6-connectivity-in-mikrotiks-routeros/">Native IPv6 connectivity in Mikrotik's RouterOS</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2012/01/11/native-ipv6-connectivity-in-mikrotiks-routeros/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

