<?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>The Official Rackspace Blog &#187; Major Hayden</title>
	<atom:link href="http://www.rackspace.com/blog/author/mhayden/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.rackspace.com/blog</link>
	<description>The Official Rackspace Blog</description>
	<lastBuildDate>Wed, 22 May 2013 18:33:44 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>Getting Started With An Open Source GUI For Rackspace Cloud DNS</title>
		<link>http://www.rackspace.com/blog/getting-started-with-an-open-source-gui-for-rackspace-cloud-dns/</link>
		<comments>http://www.rackspace.com/blog/getting-started-with-an-open-source-gui-for-rackspace-cloud-dns/#comments</comments>
		<pubDate>Thu, 12 Apr 2012 16:54:35 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Tips for Devs and Sys Admins]]></category>
		<category><![CDATA[DNS]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[Rackspace Cloud DNS]]></category>

		<guid isPermaLink="false">http://www.rackspace.com/blog/?p=16691</guid>
		<description><![CDATA[Racker Major Hayden started an open source project to make a graphical interface for the Rackspace Cloud DNS service to help you with common DNS tasks.]]></description>
				<content:encoded><![CDATA[<p>Although DNS might not be one of the most glamorous services, it&#8217;s one of the most critical. Hosting your own DNS servers certainly isn&#8217;t trivial and it requires you to maintain your own highly available environments, keep up with security patches and tightly manage your configuration files.</p>
<p>Rackspace&#8217;s <a href="http://www.rackspace.com/cloud/cloud_hosting_products/dns/">Cloud DNS</a> service takes care of the heavy lifting of maintaining DNS servers and allows you to <a href="http://docs.rackspace.com/api/">query an API</a> to manage your DNS zones and their records. The deal is a little more sweet once you learn that the service is currently free of charge.</p>
<p>Writing scripts to query an API is surely convenient for automation but it might not be handy if you&#8217;re looking to make some quick adjustments to various domains. That&#8217;s why I <a href="http://rackerhacker.github.com/rackspace-clouddns-gui/">started a small project</a> to make a graphical interface for the Rackspace Cloud DNS service. The project contains a small <a href="http://python.org/">Python</a> application based on <a href="http://flask.pocoo.org/">Flask</a>, <a href="http://jinja.pocoo.org/docs/">Jinja2</a> and <a href="https://github.com/rackspace/python-clouddns" class="broken_link" rel="nofollow">python-clouddns</a>.</p>
<p>All of the installation instructions and documentation is over in <a href="http://rackerhacker.github.com/rackspace-clouddns-gui/">GitHub</a>. As of today, you can do quite a few tasks in the interface:</p>
<p>•    List all of the domains in your account<br />
•    Add and remove domains from your account<br />
•    View and edit records under each of your DNS zones<br />
•    All of the record types supported by the API are supported in the interface</p>
<p>It would be unreasonable to write a post about a graphical application without a few screenshots:</p>
<p><strong>Adding a zone</strong></p>
<p><a href="http://c179631.r31.cf0.rackcdn.com/DNS_add_a_domain.jpg"><img class="alignnone" title="Add a Domain" src="http://c179631.r31.cf0.rackcdn.com/DNS_add_a_domain.jpg" alt="" width="600" height="341" /></a></p>
<p style="text-align: left;"><strong>Adding records to a zone</strong></p>
<p><a href="http://c179631.r31.cf0.rackcdn.com/DNS_add_a_record.jpg"><img class="alignnone" title="Add a Record" src="http://c179631.r31.cf0.rackcdn.com/DNS_add_a_record.jpg" alt="" width="600" height="342" /></a></p>
<p><strong>Listing records in a zone</strong></p>
<p><strong><a href="http://c179631.r31.cf0.rackcdn.com/DNS_record_listing.jpg"><img class="alignnone" title="Listing records" src="http://c179631.r31.cf0.rackcdn.com/DNS_record_listing.jpg" alt="" width="600" height="342" /></a></strong></p>
<p>If you find bugs or think of improvements, feel free to open an issue in the GitHub project or start a pull request.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rackspace.com/blog/getting-started-with-an-open-source-gui-for-rackspace-cloud-dns/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How I Started Learning Python</title>
		<link>http://www.rackspace.com/blog/how-i-started-learning-python/</link>
		<comments>http://www.rackspace.com/blog/how-i-started-learning-python/#comments</comments>
		<pubDate>Wed, 11 Apr 2012 15:00:07 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Tips for Devs and Sys Admins]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://www.rackspace.com/blog/?p=16570</guid>
		<description><![CDATA[Racker Major Hayden's recent work has been on the OpenStack project where he has had to learn Python. Here are some of his tips on how he has learned the language.]]></description>
				<content:encoded><![CDATA[<p><em>Disclaimer: If you already know Python really well, this post might not be handy for you. However, I&#8217;d still love to see your comments and feedback if you have a moment to reply.</em></p>
<p>Much of my recent work has centered on <a href="http://www.openstack.org/">OpenStack</a> and I&#8217;ve found myself overwhelmed by learning Python. Although I don&#8217;t have any formal education on anything related to computer science or programming, I&#8217;ve worked my way through PHP, Perl and Ruby.</p>
<p>Ruby seems to be the most comfortable language for me to use due to the simplicity of the syntax and the handy features provided by the standard libraries and common gems. Python always caught me as strange due to the <a href="http://docs.python.org/release/2.5.1/ref/indentation.html">forced indenting</a> (I indent my code properly anyway, but it still feels weird to be forced to do so), <a href="http://docs.python.org/tutorial/classes.html#python-scopes-and-namespaces">module namespaces</a> and the <a href="http://en.wikipedia.org/wiki/Python_syntax_and_semantics">overall syntax</a>. Things like <a href="http://docs.python.org/tutorial/datastructures.html#list-comprehensions">list and generator comprehension</a> made my head spin and I avoided Python like the plague.</p>
<p>All of that had to change over the past few months. I&#8217;m not an expert in Python by any means but I&#8217;ll be glad to share with you how I trekked from the depths of Ruby to the edge of Python.</p>
<h2>Learn Python The Hard Way</h2>
<p>Zed Shaw&#8217;s <a href="http://learnpythonthehardway.org/">guide to learning Python</a> has been the primary recommendation from every Python developer I&#8217;ve polled at Rackspace. It is clear, concise and accurate; however, I never did finish the HTML guide. Something would end up distracting me or I&#8217;d become discouraged by something I couldn&#8217;t understand.</p>
<p>That&#8217;s when I found the <a href="http://www.udemy.com/learn-python-the-hard-way/">video course on Udemy</a>. The video course costs $29 and comes with the PDF copy of the book. You can watch Zed work through the problems on screen via an easy-to-follow screencast. He even makes common errors on screen and runs the interpreter so you can get familiar with exceptions from common typos.</p>
<h2>Python Documentation</h2>
<p>If it&#8217;s in Python or the standard libraries bundled along with it, it&#8217;s in the <a href="http://docs.python.org/">Python documentation</a>. There are plenty of code examples for almost all of the methods from the standard libraries on the site. It&#8217;s a good resource to bookmark while you&#8217;re learning what certain methods do and which parameters they expect. You can also ensure that your code isn&#8217;t importing modules that are deprecated.</p>
<h2>Stack Overflow</h2>
<p>This could draw criticism from some, but <a href="http://stackoverflow.com/questions/tagged/python">Stack Overflow</a> is a good resource to find better ways to do things in Python. I&#8217;ve written some pretty ugly Python code only to find that I could have called a couple of methods from modules found in Python&#8217;s standard libraries. You can find lots of examples of code simplification and recommendations for which modules to use for a particular project.</p>
<p>Keep in mind that some suggestions on the site can be subpar. Some may contain deprecated or insecure code that could hurt your project&#8217;s success. Be sure to look through the comments after each answer to ensure that you&#8217;re reading a solid solution.</p>
<h2>Coworkers And Colleagues</h2>
<p>Some of the best resources for learning Python are probably all around you in your office or online. I&#8217;m extremely fortunate to be surrounded by gifted and experienced developers at Rackspace who genuinely care about their work and want to share their strategies with others. I&#8217;ve always had a tough time understanding <a href="http://en.wikipedia.org/wiki/Lambda_(programming)">lambdas</a> (I couldn&#8217;t understand them in Ruby, either), but one of my coworkers took me through some examples as I was leaving work.</p>
<p>If you feel like you might be a bother to your coworkers, try to do some homework on the topic first or give them a specific example of what you&#8217;re trying to solve. It will show them that you&#8217;ve done your best to understand the topic but that you need some help getting over the hump. A hot cup of their favorite coffee or snack doesn&#8217;t hurt either.</p>
<h2>Just Try It</h2>
<p>Find a problem, make a project and write some Python. Most of us have something we&#8217;d like to accomplish if we had the time. Take that idea or problem and write Python to solve it. You&#8217;ll pick up new knowledge as you work through the project and you&#8217;ll probably back yourself into a corner more than once. When it happens, go back to the documentation, do some <a href="http://lmgtfy.com/?q=how+to+solve+a+difficult+python+problem" target="_blank">Googling</a> and lean on your peers.</p>
<p>I&#8217;ve been working with Python for just over a month and these strategies have jump started my learning by leaps and bounds. If you&#8217;re struggling, drop me a line and I&#8217;ll see what I can do to help. I&#8217;m also eager to hear your strategies for learning Python so they can be shared with others.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rackspace.com/blog/how-i-started-learning-python/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Why Technical People Should Blog (But Don&#8217;t)</title>
		<link>http://www.rackspace.com/blog/why-technical-people-should-blog-but-dont/</link>
		<comments>http://www.rackspace.com/blog/why-technical-people-should-blog-but-dont/#comments</comments>
		<pubDate>Tue, 20 Mar 2012 15:00:34 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Tips for Devs and Sys Admins]]></category>
		<category><![CDATA[Racker Hacker]]></category>

		<guid isPermaLink="false">http://www.rackspace.com/blog/?p=16048</guid>
		<description><![CDATA[Racker Major Hayden, an active blogger on his own site RackerHacker.com, presents several reasons why technical people should write blogs (and some common objections to why they don't).]]></description>
				<content:encoded><![CDATA[<p>Sometimes people talk to me about posts I&#8217;ve written on my blog, or posts they wish I would write. At some point during the discussion, I&#8217;ll almost always ask the person why they don&#8217;t start up their own blog or contribute to someone else&#8217;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&#8217;t consider until you&#8217;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&#8217;s nothing that says technical people can&#8217;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&#8217;ll roll through some of the most common responses I&#8217;ve received about why technical people don&#8217;t blog about what they know.</p>
<blockquote><p><em>I don&#8217;t think I&#8217;m really an expert on anything. I&#8217;m not an authority on any topic I can think of.</em></p></blockquote>
<p>I&#8217;m leading off with this response because it&#8217;s the most critical to refute. If you don&#8217;t take away anything else from this post, let it be this: you don&#8217;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&#8217;d consider myself to be an expert on one, maybe two topics, but I&#8217;ve written over 450 posts in the span of just over five years. I certainly didn&#8217;t write all of those about the one or two topics I know best.</p>
<p>Write about what you know and don&#8217;t be afraid to do a little research to become an authority on something. A great example of this was my post, entitled &#8220;<a title="Kerberos for Haters | Racker Hacker" href="http://rackerhacker.com/2012/02/02/kerberos-for-haters/" target="_blank">Kerberos for haters</a>.&#8221; I had almost no expertise in Kerberos. In fact, I couldn&#8217;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><em>What if I say something that isn&#8217;t correct? I&#8217;ll look like an idiot in front of the whole internet!</em></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&#8217;t) and it&#8217;s your duty to correct your post or correct the reader. I&#8217;ve written posts with errors, and I&#8217;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&#8217;ll make mistakes. As long as you&#8217;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><em>I&#8217;m great at a command prompt but my spelling and grammar are awful. I write terribly.</em></p></blockquote>
<p>This is easily fixed. If you&#8217;re one of those folks who live the do-it-yourself type of lifestyle, pick up a copy of <a title="The Elements of Style | Wikipedia" href="http://en.wikipedia.org/wiki/The_Elements_of_Style" target="_blank"><em>The Elements of Style</em></a> by Strunk &amp; White. There are free PDF versions online or you can borrow one from your nearest journalist. No matter the situation you&#8217;re in, this book has details about where punctuation should and shouldn&#8217;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&#8217;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&#8217;ve even <a title="Proofreading | Fiverr" href="http://fiverr.com/categories/all/tags/proofreading/order/latest/pages/1" target="_blank">spotted some folks on Fiverr</a> who will do this for as low as $5.</p>
<p>I&#8217;ll wrap up with the second most common response:</p>
<blockquote><p><em>I don&#8217;t know who I&#8217;m writing for? What if I write about something simple and the really technical folks think I&#8217;m a noob? What if I write something crazy complex and it goes over most people&#8217;s heads?</em></p></blockquote>
<p>I&#8217;ve done both of these. Most Linux system administrators worth their salt know how to add and remove iptables rules, and they&#8217;d consider it to be pretty trivial work. Would it surprise you to know that out of over 450 posts, my post about <a title="Delete Single iptables Rules | Racker Hacker" href="http://rackerhacker.com/2007/02/09/delete-single-iptables-rules/" target="_blank">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&#8217;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&#8217;s the simplest topic possible.</p>
<p>On the flip side, I went nuts and wrote up a <a title="Redundant Cloud Hosting Configuration Guide | Racker Hacker" href="http://rackerhacker.com/redundant-cloud-hosting-configuration-guide/" target="_blank">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&#8217;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><strong>Let&#8217;s conclude and wrap up.</strong> Keep these things in mind if you feel discouraged about writing:</p>
<p>•    Write about what interests you whether you&#8217;re an expert on it or not<br />
•    Don&#8217;t be afraid to fail<br />
•    Be responsive to your readers<br />
•    Even if you think nobody will read your post, write it<br />
•    Always ensure your voice shines through in your writing &#8212; this is what makes it special and appealing</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rackspace.com/blog/why-technical-people-should-blog-but-dont/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>Racker Hacker: Create a Local PyPi Repository Using Only mod_rewrite</title>
		<link>http://www.rackspace.com/blog/racker-hacker-create-a-local-pypi-repository-using-only-mod_rewrite/</link>
		<comments>http://www.rackspace.com/blog/racker-hacker-create-a-local-pypi-repository-using-only-mod_rewrite/#comments</comments>
		<pubDate>Mon, 05 Mar 2012 16:49:00 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Tips for Devs and Sys Admins]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://www.rackspace.com/blog/?p=15497</guid>
		<description><![CDATA[Racker Major Hayden walks you through configuring a local PyPi repository. This post originally appeared on his blog, Racker Hacker.]]></description>
				<content:encoded><![CDATA[<div>
<p><em>The post originally appeared on <em>Major’s blog,</em> <a title="Racker Hacker | Blog" href="http://rackerhacker.com/" target="_blank">Racker Hacker</a>, and with his permission we have reposted it here.</em></p>
<p>Regular users of Python&#8217;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&#8217;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&#8217;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&#8217;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>
<div>
<pre>/var/pypi/simple/[package_name]/[package_tarball]</pre>
</div>
</div>
<p>For a package like <code>pip</code>, you&#8217;d make a structure like this:</p>
<div>
<div>
<pre>/var/pypi/simple/pip/pip-1.0.2.tar.gz</pre>
</div>
</div>
<p>Once you have at least one package stored locally, it&#8217;s time to configure apache. Here&#8217;s a snippet from the virtual host I configured:</p>
<div>
<div>
<pre>DocumentRoot /var/pypi/
ServerName pypi.example.com

Options +Indexes

RewriteEngine On
RewriteRule ^/robots.txt - [L]
RewriteRule ^/icons/.* - [L]
RewriteRule ^/index\..* - [L]

RewriteCond /var/pypi/$1 !-f
RewriteCond /var/pypi/$1 !-d
RewriteRule ^/(.*)/?$  [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&#8217;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&#8217;s try to download the <code>pip</code> tarball from our local server in the example I mentioned above:</p>
<div>
<div>
<pre>$ curl -I 
HTTP/1.1 200 OK

$ curl -I 
HTTP/1.1 200 OK</pre>
</div>
</div>
<p>I&#8217;ve obviously snipped a bit of the response above, but you can see that apache is responding with 200&#8242;s since it has the directories and files that I was trying to retrieve via curl. Let&#8217;s try to get something we don&#8217;t have locally, like <code>kombu</code>:</p>
<div>
<div>
<pre>$ curl -I 
HTTP/1.1 302 Found
Location: http://pypi.python.org/simple/kombu/</pre>
</div>
</div>
<p>Our local PyPi repository doesn&#8217;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>
<div>
<pre>[global]
index-url = </pre>
</div>
</div>
<p>If you&#8217;d rather use <code>easy_install</code>, edit <code>~/.pydistutils.cfg</code> and add:</p>
<div>
<div>
<pre>[easy_install]
index_url = </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&#8217;t have locally. You can add <code>-v</code> to <code>pip install</code> to watch it retrieve different URL&#8217;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>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.rackspace.com/blog/racker-hacker-create-a-local-pypi-repository-using-only-mod_rewrite/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Racker Hacker: Getting started with SELinux</title>
		<link>http://www.rackspace.com/blog/racker-hacker-getting-started-with-selinux/</link>
		<comments>http://www.rackspace.com/blog/racker-hacker-getting-started-with-selinux/#comments</comments>
		<pubDate>Mon, 27 Feb 2012 15:07:09 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Tips for Devs and Sys Admins]]></category>
		<category><![CDATA[Racker Hacker]]></category>
		<category><![CDATA[SELinux]]></category>

		<guid isPermaLink="false">http://www.rackspace.com/blog/?p=15121</guid>
		<description><![CDATA[The post originally appeared on Racker Hacker, Major’s blog, and with his permission we have reposted it here. 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 [...]]]></description>
				<content:encoded><![CDATA[<p><em>The post originally appeared on <a title="Racker Hacker | Blog" href="http://rackerhacker.com/" target="_blank">Racker Hacker</a>, Major’s blog, and with his permission we have reposted it here.</em></p>
<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&#8217;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&#8217;re trying to get started with SELinux but you&#8217;re not sure how to do it without completely disrupting your server&#8217;s workflow, these tips should help:<strong></strong></p>
<h2>Get some good reporting and monitoring</h2>
<p>Two of the most handy SELinux tools are <a title="Settroubleshoot | Fedora Hosted" href="https://fedorahosted.org/setroubleshoot/" target="_blank">setroubleshoot and setroubleshoot-server</a>. If you&#8217;re running a server without X, you can use <a title="Receive e-mail reports for SELinux AVC denials | Racker Hacker" href="https://rackerhacker.com/2011/09/15/receive-e-mail-reports-for-selinux-avc-denials/" target="_blank">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&#8217;t expect, you&#8217;ll know about the potential security breach almost immediately.</p>
<div>
<h2>Start out with SELinux in permissive mode</h2>
<p>If you&#8217;re overly concerned about SELinux getting in your way, or if you&#8217;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>
<div>
<pre># setenforce 0
# getenforce
Permissive</pre>
</div>
</div>
<p>Edit <code>/etc/sysconfig/selinux</code> to make it persistent across reboots:</p>
<div>
<div>
<pre># 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>
<h2>Adjust booleans before adding your own custom modules</h2>
<p>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>
<div>
<pre># 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>
<div>
<pre># 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>
<div>
<pre># setsebool httpd_can_network_memcache on</pre>
</div>
</div>
<h2>Tracking your history of AVC denials</h2>
<p>All of your AVC denals are logged by <code>auditd</code> in <code>/var/log/audit/audit.log</code> but it&#8217;s not the easiest file to read and parse. That&#8217;s where <code>aureport</code> comes in:</p>
<div>
<div>
<pre># 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>
<h2>Summary</h2>
<p>There&#8217;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&#8217;t?), you&#8217;ll have an extra layer of security and access restrictions which should let you sleep a little better at night.</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.rackspace.com/blog/racker-hacker-getting-started-with-selinux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Preparing for Red Hat Exams</title>
		<link>http://www.rackspace.com/blog/preparing-for-red-hat-exams/</link>
		<comments>http://www.rackspace.com/blog/preparing-for-red-hat-exams/#comments</comments>
		<pubDate>Thu, 16 Feb 2012 16:22:09 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Tips for Devs and Sys Admins]]></category>
		<category><![CDATA[Red Hat]]></category>
		<category><![CDATA[RHCA]]></category>
		<category><![CDATA[RHCE]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://www.rackspace.com/blog/?p=14801</guid>
		<description><![CDATA[Major Hayden has successfully completed a series of exams to become RHCA certified. Here are some of his tips on how to best prepare for a Red Hat exam. 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 [...]]]></description>
				<content:encoded><![CDATA[<p><em>Major Hayden has successfully completed a series of exams to become RHCA certified. Here are some of his tips on how to best prepare for a <a title="Certifications | Red Hat" href="http://www.redhat.com/training/certifications/ " target="_blank">Red Hat exam</a>.</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, &#8220;I&#8217;m really going to get ahead of this next time and study early. This last minute stuff is terrible.&#8221; But I always forget all of this as the next exam rolls around.</p>
<p><strong>Quick note:</strong> 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&#8217;ll understand why I&#8217;m not able to go into details about certain portions of the Red Hat examinations.</p>
<p>I&#8217;ve taken seven Red Hat exams already: two for the RHCE and five for the RHCA. These tests certainly aren&#8217;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>
<h2>Build a flexible study environment</h2>
<p>This is critical. You&#8217;ll need some spare servers or some available virtual machines to practice the objectives on each exam. However, don&#8217;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&#8217;ll be tested on at exam time. Your study environment should meet some basic criteria:</p>
<p>•    You should be able to quickly build and tear down servers or virtual machines<br />
•    Keep the latency to your environment low to avoid getting frustrated<br />
•    Use applications like VirtualBox, VMWare Fusion/Workstation to practice on your own computer<br />
•    Consider using VMs from cloud providers if you&#8217;re under a time crunch</p>
<p>Some exams may require some bare-metal access to the server itself (especially <a title="EX442 | Red Hat" href="https://www.redhat.com/courses/ex442_red_hat_enterprise_system_monitoring_and_performance_tuning_expertise_exam/" target="_blank">EX442</a>), so keep that in mind when you&#8217;re looking for a good practice environment. You may need some specific network or storage setups for some exams (as with <a title="EX436 | Red Hat" href="https://www.redhat.com/courses/ex436_red_hat_enterprise_clustering_and_storage_management_expertise_exam/" target="_blank">EX436</a>). If you&#8217;re not sure what you need, be sure to ask your instructor or someone else you know who has taken the exam already.</p>
<h2>Prioritize doing over reading</h2>
<p>The Red Hat exams are all hands-on, practical exams. You won&#8217;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&#8217;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>
<h2>Research the why, not the what, to remember</h2>
<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&#8217;s difficult to remember each command to bring a certain service online or to repair a problem. Instead of thinking through the problem as &#8220;first, I do this, then I do this&#8221;, try to understand why each step is important in the first place.</p>
<p>Here&#8217;s a good example. I&#8217;ll be the first one to admit that Kerberos drives me crazy. I&#8217;ve even <a title="Kerberos for Haters | Racker Hacker" href="http://rackerhacker.com/2012/02/02/kerberos-for-haters/" target="_blank">written posts</a> about it. The commands seemed really archaic, the daemons didn&#8217;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&#8217;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. &#8220;Okay,&#8221; I thought to myself, &#8220;I need principals in a keytab to do these things, but I need to have a database for the admin stuff first.&#8221; Suddenly, the order of things in my head wasn&#8217;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&#8217;re doing what you&#8217;re doing. Once it becomes second nature, working through the problems on the exam becomes much easier.</p>
<h2>Lean on your available resources</h2>
<p>Don&#8217;t forget that there are other knowledgeable folks available to talk to when you get bogged down. Lean on other RHCE&#8217;s, RHCA&#8217;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 title="Certification Forums | Red Hat" href="https://certforums.redhat.com/login.php" target="_blank">Red Hat Certification Forums</a> and meet up with other examinees that are discussing test preparation.</p>
<p>Also, you&#8217;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&#8217;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>
<h2>Summary</h2>
<p>Remember to lean on the knowledge of others, get hands-on with the test objectives and do your research when you&#8217;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>
]]></content:encoded>
			<wfw:commentRss>http://www.rackspace.com/blog/preparing-for-red-hat-exams/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Write Emails to Nerds (That They&#039;ll Actually Read)</title>
		<link>http://www.rackspace.com/blog/how-to-write-emails-to-nerds-that-theyll-actually-read/</link>
		<comments>http://www.rackspace.com/blog/how-to-write-emails-to-nerds-that-theyll-actually-read/#comments</comments>
		<pubDate>Wed, 11 Jan 2012 21:12:59 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Business Tips and Tricks]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[sysadmin]]></category>

		<guid isPermaLink="false">http://www.rackspace.com/cloud/blog/?p=11147</guid>
		<description><![CDATA[The post originally appeared on Racker Hacker, Major&#8217;s blog, and with his permission we have reposted it here. Standard email etiquette is pretty obvious to most of us and if you&#8217;re good at it, you&#8217;ll get your point across more often without stepping on toes or causing unneeded confusion. Simple things like identifying yourself well, [...]]]></description>
				<content:encoded><![CDATA[<div>
<p><em>The post originally appeared on <a title="Racker Hacker | Blog" href="http://rackerhacker.com" target="_blank">Racker Hacker</a>, Major&#8217;s blog, and with his permission we have reposted it here.</em></p>
<p>Standard email etiquette is pretty obvious to most of us and if you&#8217;re good at it, you&#8217;ll get your point across more often without stepping on toes or causing unneeded confusion. Simple things like identifying yourself well, avoiding sarcasm and adding context to statements are all extremely beneficial. However, writing emails to highly technical developers, system administrators and engineers is a little trickier. These types of email recipients don&#8217;t really enjoy handling email (inbound or outbound) and most find that email is just a speed bump which interrupts their productivity.</p>
<p>If you&#8217;re not technical, you might be asking yourself: <em>&#8220;I need to email technical people and they need to take what I say seriously? How do I do it?&#8221;</em> It&#8217;s not impossible, but the rest of this blog post should help.</p>
<h2>Brevity is key</h2>
<div>There are some people who thrive on receiving email, sending email and talking about email that they&#8217;ve sent or received. Most nerds don&#8217;t feel this way.</div>
<p>You need to get your point across concisely and succinctly so that your email is seen as less of a distraction. Avoid adding a lot of context where it isn&#8217;t needed and try to summarize business needs and processes unless details are absolutely critical. If you need to send your email to multiple recipients and some of those recipients need additional details, provide an abstract at the beginning of the email.</p>
<h2>Learn the ways of TL;DR</h2>
<p>I&#8217;ve heard quite a few conversations like these around the office:</p>
<p style="padding-left: 30px;">Nerd 1: &#8220;Did you get that email from [name here]?&#8221;<br />
Nerd 2: &#8220;The six page one with four PDF files attached?&#8221;<br />
Nerd 1: &#8220;Yeah. That one.&#8221;<br />
Nerd 2: &#8220;TL;DR dude, seriously. Did you read it?&#8221;<br />
Nerd 1: &#8220;Nah. I might read it later.&#8221;</p>
<p>If someone&#8217;s ever mentioned &#8220;TL;DR&#8221; (too long; didn&#8217;t read) when your email was mentioned, don&#8217;t fret. It&#8217;s a quick fix. Just add a quick summary to the top of your email prefaced with &#8220;TL;DR&#8221;. Provide a really brief summary (bulleted lists are a plus) of your email in the section and then start your email right afterwards. Here&#8217;s an example:</p>
<pre>TL;DR
 * next software release deploys Monday
 * two bugs remaining to fix
 * we will get started at 8AM Saturday, yeaaaaah</pre>
<p><em>(Missed the joke? <a title="Bill Lumbergh | Wikipedia" href="http://en.wikipedia.org/wiki/Bill_Lumbergh">Head over to Wikipedia</a>.</em>)</p>
<p>If one of the summary points interests a recipient, they&#8217;ll scan your email for the pertinent sections. Some recipients may only need to see what&#8217;s in the summary and they won&#8217;t bother reading the remainder. Either way, the effectiveness of your email increases by leaps and bounds.</p>
<h2>Plain text</h2>
<div class="wp-caption alignright" style="width: 263px"><a href="http://c179631.r31.cf0.rackcdn.com/mutt-screenshots_001.jpg"><img title="Mutt Screenshot" src="http://c179631.r31.cf0.rackcdn.com/mutt-screenshots_001.jpg" alt="" width="253" height="163" /></a><p class="wp-caption-text">Users of mutt prefer plain text e-mails</p></div>
<p>If you only take away one thing from this entire post, let it be this section. Writing emails in plain text is *highly recommended* if you want a technical person to take your email seriously. Many system administrators I know use <a title="Mutt | Official Site" href="http://www.mutt.org/" target="_blank">mutt</a>, a text-based console-only email reader. Click the thumbnail at the right and imagine what your emails would look like if they&#8217;re full of images, stylesheets and background images. Better yet, imagine if your entire email was in an image and the email itself had no text.Here are a few more tips under this category:</p>
<p>•    Don&#8217;t use Outlook stationery.<br />
•    Never send emails with an image as the email itself.<br />
•    No Comic Sans at any time. Period.<br />
•    Avoid graphical email signatures (more on that in a moment).</p>
<h2>Email signatures</h2>
<p>Brevity can definitely be applied to email signatures, too. How many times have you seen emails that end like this:</p>
<div>
<div>
<pre>Frank Frankelton MCSE, RHCSA, RHCE, CCNA, RHCA, LPIC-3, Ph.D., M.D., Esq., CMDBA
Systems Adminstrator Extraordinaire, Database Administrator, All-around great guy
Office: 210-555-1212
Mobile: 210-555-1213
Other Mobile: 210-555-1214
Fax: 210-555-1215
VOIP: 210-555-1216
AIM: frankeltonia
Twitter: @frankyfrank
Jabber: frankfurter@frankeltonisinthehouse.com
Big Company, Inc</pre>
</div>
</div>
<p>&nbsp;</p>
<p>You might think that nobody would ever send out emails with a signature like the one above, but I&#8217;ve seen some that are actually worse. Keep the signature short and only put in the information that people really need to know. Generally, your name and title or department is sufficient for email signatures (unless your local/federal laws require otherwise). Always preface it with a double dash &#8220;&#8211;&#8221; on a line by itself to signify that the remainder of the email is the signature.</p>
<h2>Summary</h2>
<p>Keep it simple, keep it brief and keep it relevant. While the suggestions above might not apply to every business or every person, following the suggestions will increase the effectiveness of your emails and ensure that your voice is heard on the other end.</p>
<p>I&#8217;m really interested to hear your comments. Are there some suggestions you have that I missed in the post? Did I make some suggestions which didn&#8217;t make sense or don&#8217;t apply to you? Let me know!</p>
<p><em>Major Hayden is a DevOps engineer working on <a title="OpenStack | Official Site" href="http://openstack.com/" target="_blank">OpenStack</a> at Rackspace and he writes posts on technology topics for his blog, <em><a title="Racker Hacker | Blog" href="http://rackerhacker.com" target="_blank">Racker Hacker</a></em>.  He is a contributor to Fedora and other open source projects.  You can follow <em><a title="@rackerhacker | Twitter" href="http://twitter.com/rackerhacker" target="_blank">@rackerhacker</a></em> on Twitter for all of Major&#8217;s tweets.</em></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.rackspace.com/blog/how-to-write-emails-to-nerds-that-theyll-actually-read/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>New Feature: Manage Your Own Kernel in Linux Cloud Servers</title>
		<link>http://www.rackspace.com/blog/new-feature-manage-your-own-kernel-in-linux-cloud-servers/</link>
		<comments>http://www.rackspace.com/blog/new-feature-manage-your-own-kernel-in-linux-cloud-servers/#comments</comments>
		<pubDate>Wed, 13 Jul 2011 16:29:12 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Cloud Industry Topics]]></category>
		<category><![CDATA[Tips for Devs and Sys Admins]]></category>
		<category><![CDATA[cloud server]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[Fedora 15]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[rackspace cloud servers]]></category>

		<guid isPermaLink="false">http://www.rackspace.com/cloud/blog/?p=9494</guid>
		<description><![CDATA[Major is the Lead Ops Engineer for Rackspace Cloud Servers. Click here to follow him on Twitter. Kernels are often overlooked but they’re one of the most critical pieces of software – if not the most critical piece – on a Linux system.  At Rackspace, we’ve traditionally kept this simple for you by maintaining kernels [...]]]></description>
				<content:encoded><![CDATA[<p><span style="color: #666699;"><em><strong>Major is the Lead Ops Engineer for Rackspace Cloud Servers. <a href="http://twitter.com/#!/rackerhacker" target="_blank">Click here</a> to follow him on Twitter. </strong></em></span></p>
<p><img class="alignright" title="cloud servers" src="http://c179631.r31.cf0.rackcdn.com/blog-servers.jpg" alt="" width="150" height="150" /></p>
<p>Kernels are often overlooked but they’re one of the most critical pieces of software – if not the most critical piece – on a Linux system.  At Rackspace, we’ve traditionally kept this simple for you by maintaining kernels <span style="text-decoration: underline;">outside</span> the instance.  More and more customers however have asked for greater control over the kernels they run.  We’ve heard you and are happy to begin introducing this capability today with our release of the Fedora 15 image.</p>
<p>Our new model going forward moves the kernel <span style="text-decoration: underline;">inside</span> the instance.  This means you can either run the included kernel provided by your Linux distribution OR replace it with any custom kernel you build on your own.  Simplicity or control – you choose what works best for you.</p>
<p>This feature has several benefits:</p>
<h2>Flexibility</h2>
<p>By allowing you to run the kernel of your choice, you’re able to add modules and easily change kernel parameters through your distribution’s package manager and kernel tools.  If you need support for something that doesn’t exist within the kernels provided by your distribution, you can also download and compile a vanilla kernel to meet your needs.</p>
<h2>Security</h2>
<p>Controlling your own kernel means you choose when to install new kernels that provide additional security features or vulnerability patches.  You simply install the new kernel, update your grub configuration file and reboot when the time is right.</p>
<h2>Stability</h2>
<p>Using your Linux distribution’s kernel ensures the highest level of compatibility between your distribution’s applications and the kernel itself.  Many utilities and applications may require certain support from the kernel and that support may be limited to certain versions of the Linux kernel.  This additional level of stability reduces application errors, kernel panics, and memory leaks.</p>
<h2>Simplicity</h2>
<p>There’s no need to worry if you’re not familiar with managing your own kernels.  Your instance will have a kernel installed from the initial build and most distributions will seamlessly install newer kernels via the distribution’s package manager.  The experience will be very similar to running Linux on a bare metal server.</p>
<p>Going forward, we will be phasing in this feature as the default for all <a href="http://www.rackspace.com/cloud/cloud_hosting_products/servers/" target="_blank">Rackspace Cloud Server</a> Linux images.  Fedora 15 is the first and other new images will follow over time.  Please note that nothing changes for existing Cloud Server instances.  However, if you wish to start managing kernels on these instances, you may convert them at your convenience.  For more information on this, <a href="http://www.rackspace.com/knowledge_center/linux_kernel_management" target="_blank">please visit this KB article</a>.</p>
<p>Our <a href="http://www.rackspace.com/cloud/cloud_hosting_products/servers/" target="_blank">Cloud Servers</a> product is rapidly evolving and we’re striving to give you the stability and flexibility you demand along with the simplicity and ease of use you expect from Rackspace.  If you have additional suggestions on new features for Cloud Servers, please visit <a href="http://feedback.rackspacecloud.com/forums/71021-product-feedback" target="_blank">feedback.rackspacecloud.com</a> and join our Product Feedback forum.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rackspace.com/blog/new-feature-manage-your-own-kernel-in-linux-cloud-servers/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Securing your SSH Server</title>
		<link>http://www.rackspace.com/blog/securing-your-ssh-server/</link>
		<comments>http://www.rackspace.com/blog/securing-your-ssh-server/#comments</comments>
		<pubDate>Thu, 11 Nov 2010 16:28:20 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Tips for Devs and Sys Admins]]></category>
		<category><![CDATA[Brute-force attack]]></category>
		<category><![CDATA[Secure Shell]]></category>
		<category><![CDATA[SSH]]></category>

		<guid isPermaLink="false">http://www.rackspacecloud.com/blog/?p=6820</guid>
		<description><![CDATA[One of the most common questions that I see in my favorite IRC channel is: &#8220;How can I secure sshd on my server?&#8221; There&#8217;s no single right answer, but most systems administrators combine multiple techniques to provide as much security as possible with the least inconvenience to the end user. Here are my favorite techniques [...]]]></description>
				<content:encoded><![CDATA[<p>One of the most common questions that I see in <a href="irc://irc.freenode.net/slicehost">my favorite IRC channel</a> is: &#8220;How can I secure sshd on my server?&#8221; There&#8217;s no single right answer, but most systems administrators combine multiple techniques to provide as much security as possible with the least inconvenience to the end user.</p>
<p>Here are my favorite techniques listed from most effective to least effective:</p>
<p><strong>SSH key pairs</strong></p>
<p>By disabling password-based authentication and requiring ssh key pairs, you reduce the chances of compromise via a brute force attack. This can also help you protect against weak account passwords since a valid private key is required to gain access to the server. However, a weak account password is still a big problem if you allow your users to use sudo.</p>
<p>If you&#8217;re new to using ssh keys, there are <a href="http://sial.org/howto/openssh/publickey-auth/">many</a> <a href="http://www.debian-administration.org/articles/530">great</a> <a href="http://www.linuxquestions.org/linux/answers/Networking/Public_key_authentication_with_ssh">guides</a> that can walk you through the process.</p>
<p><strong>Firewall</strong></p>
<p>Limiting the source IP addresses that can access your server on port 22 is simple and effective. However, if you travel on vacation often or your home IP address changes frequently, this may not be a convenient way to limit access. Acquiring a server with trusted access through your firewall would make this method easier to use, but you&#8217;d need to <a href="http://en.wikipedia.org/wiki/Recursion">consider the security of that server as well</a>.</p>
<p>The iptables rules would look something like this:</p>
<div class="wp_syntax">
<div class="code">
<pre class="html" style="font-family: monospace;">iptables -A INPUT -j ACCEPT -p tcp --dport 22 -s 10.0.0.20
iptables -A INPUT -j ACCEPT -p tcp --dport 22 -s 10.0.0.25
iptables -A INPUT -j DROP -p tcp --dport 22</pre>
</div>
</div>
<p><strong>Use a non-standard port</strong></p>
<p>I&#8217;m not a big fan of <a href="http://en.wikipedia.org/wiki/Security_through_obscurity">security through obscurity</a> and it doesn&#8217;t work well for ssh. If someone is simply scanning a subnet to find ssh daemons, you might not be seen the first time. However, if someone is targeting you specifically, changing the ssh port doesn&#8217;t help at all. They&#8217;ll find your ssh banner quickly and begin their attack.</p>
<p>If you prefer this method, simply adjust the <code>Port</code> configuration parameter in your sshd_config file.</p>
<p><strong>Limit users and groups</strong></p>
<p>If you have only certain users and groups who need ssh access to your server, setting user or group limits can help increase security. Consider a server which needs ssh access for developers and a manager. Adding this to to your sshd_config would allow only those users and groups to access your ssh daemon:</p>
<div class="wp_syntax">
<div class="code">
<pre class="html" style="font-family: monospace;">AllowGroups developers
AllowUsers jsmith pjohnson asamuels</pre>
</div>
</div>
<p>Keep in mind that any users or groups not included in the sshd_config won&#8217;t be able to access your ssh server.</p>
<p><strong>TCP wrappers</strong></p>
<p>While <a href="http://en.wikipedia.org/wiki/TCP_Wrapper">TCP wrappers</a> are tried and true, I consider them to be a bit old-fashioned. I&#8217;ve found that many new systems administrators may not think of TCP wrappers when they diagnose server issues and this could possibly cause delays when adjustments need to be made later.</p>
<p>If you&#8217;re ready to use TCP wrappers to limit ssh connections, check out <a href="http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/5/html/Deployment_Guide/s1-tcpwrappers-access.html">Red Hat&#8217;s extensive documentation</a>.</p>
<p><strong>fail2ban and denyhosts</strong></p>
<p>For those systems administrators who want to take a bit more active stance on blocking brute force attacks, there&#8217;s always <a href="http://en.wikipedia.org/wiki/Fail2ban">fail2ban</a> or <a href="http://en.wikipedia.org/wiki/DenyHosts">denyhosts</a>. Both fail2ban and denyhosts monitor your authentication logs for repeated failures, but denyhosts can only work with your ssh daemon. You can use fail2ban with other applications like web servers and FTP servers.</p>
<p>The only downside of using these applications is that if a valid user accidentally tries to authenticate unsuccessfully multiple times, they may be locked out for a period of time. This could be a big problem if you&#8217;re in the middle of a server emergency.</p>
<p>A quick search on Google will give you instructions on <a href="http://www.fail2ban.org/wiki/index.php/HOWTOs">fail2ban configuration</a> as well as <a href="http://denyhosts.sourceforge.net/faq.html#2_0">denyhosts configuration</a>.</p>
<p><strong>Port knocking</strong></p>
<p>Although <a href="http://en.wikipedia.org/wiki/Port_knocking">port knocking</a> is another tried and true method to prevent unauthorized access, it can be annoying to use unless you have users who are willing to jump through additional hoops. Port knocking involves a &#8220;knock&#8221; on an arbitrary port that then allows the ssh daemon to be exposed to the user who sent the original knock.</p>
<p><a href="http://www.linuxjournal.com/article/6811">Linux Journal</a> has a great article explaining how port knocking works and it provides some sample configurations as well.</p>
<p><strong>Conclusion</strong></p>
<p>The best way to secure your ssh daemon is to apply more than one of these methods to your servers. Weighing security versus convenience of access isn&#8217;t an easy task and it will be different for every environment. Regardless of the method or methods you choose, ensure that the rest of your team is comfortable with the changes and capable of adapting to them efficiently.</p>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"></div>
]]></content:encoded>
			<wfw:commentRss>http://www.rackspace.com/blog/securing-your-ssh-server/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>Fedora 14 is Now Available for Cloud Servers</title>
		<link>http://www.rackspace.com/blog/fedora-14-is-now-available-for-cloud-servers/</link>
		<comments>http://www.rackspace.com/blog/fedora-14-is-now-available-for-cloud-servers/#comments</comments>
		<pubDate>Wed, 03 Nov 2010 19:58:42 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Product Announcements and Updates]]></category>
		<category><![CDATA[cloud servers]]></category>
		<category><![CDATA[Fedora]]></category>

		<guid isPermaLink="false">http://www.rackspacecloud.com/blog/?p=6806</guid>
		<description><![CDATA[The latest version of the Fedora Linux distribution was released yesterday morning and we&#8217;ve made it available for all Cloud Servers customers.  While the majority of Fedora 14&#8242;s improvements are for desktop users, there are still quite a few improvements for servers as well. There are significant improvements for customers using varnish to cache data [...]]]></description>
				<content:encoded><![CDATA[<p><img class="alignright" title="fedora" src="http://c0179631.cdn.cloudfiles.rackspacecloud.com/fedoraLogo.jpg" alt="" width="175" height="53" />The latest version of the Fedora Linux distribution was released yesterday morning and we&#8217;ve made it available for all <a href="http://www.rackspacecloud.com/cloud_hosting_products/servers" target="_blank">Cloud Servers </a>customers.  While the majority of Fedora 14&#8242;s improvements are for desktop users, there are still quite a few improvements for servers as well.</p>
<p>There are significant improvements for customers using varnish to cache data before it reaches the web server.  Fedora 14 comes with varnish 2.1.3 and it provides significant improvements to critbit, the default hashing method.  Also, you can now add logging within your VCL&#8217;s.  If you&#8217;re having trouble with a specific VCL, this can really help with your debugging efforts.  Apache also received a bump to version 2.2.16 which contains many security fixes and some enhancements for various modules, such as mod_ldap, mod_proxy, and mod_filter.</p>
<p>Developers will find that Fedora 14 offers support for the D programming language and GNUstep.  The python, erlang, and perl language interpreters also received updates.  If your applications depend heavily on processing images, you&#8217;ll benefit from the replacement of libjpeg with libjpeg-turbo.  On Fedora&#8217;s primary architectures, which include i686 and x86_64, you may see jpeg compression and decompression performance increase by as much as double.  The libjpeg-turbo project is also developed in a more open-source manner than libjpeg.</p>
<p>The best way to discover all of the new features is to spin up a Cloud Server with Fedora 14 and give it a try.  If you want to learn more about Fedora, join #fedora on Freenode IRC, or <a href="http://docs.fedoraproject.org/en-US/Fedora/14/html/Release_Notes/">view the release notes</a>.</p>
<p>Fedora 12 is considered EOL on December 2, 2010, so you won&#8217;t be able to build new instances with Fedora 12 after that point.  Of course, if you are still using Fedora 12 on an active Cloud Server, you won&#8217;t be affected by the change.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rackspace.com/blog/fedora-14-is-now-available-for-cloud-servers/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Content Delivery Network via Rackspace Cloud Files: c3414940.r40.cf0.rackcdn.com

 Served from: www.rackspace.com @ 2013-05-22 13:50:48 by W3 Total Cache -->