<?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; linux</title>
	<atom:link href="http://rackerhacker.com/tag/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://rackerhacker.com</link>
	<description>Words of wisdom from a server administrator</description>
	<lastBuildDate>Tue, 07 Feb 2012 14:07:41 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<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 KDC.  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>3</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-di…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>3</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>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>
		<item>
		<title>Getting online with a CradlePoint PHS-300 and an AT&amp;T USBConnect Mercury</title>
		<link>http://rackerhacker.com/2011/12/16/getting-online-with-a-cradlepoint-phs-300-and-an-att-usbconnect-mercury/</link>
		<comments>http://rackerhacker.com/2011/12/16/getting-online-with-a-cradlepoint-phs-300-and-an-att-usbconnect-mercury/#comments</comments>
		<pubDate>Fri, 16 Dec 2011 07:07:08 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[wireless]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=2682</guid>
		<description><![CDATA[Anyone who has used a 3G ExpressCard or USB stick knows how handy they can be when you need internet access away from home (and away from Wi-Fi). I've run into some situations recently where I needed to share my 3G connection with more than one device without using internet sharing on my MacBook Pro. [...]<p><a href="http://rackerhacker.com/2011/12/16/getting-online-with-a-cradlepoint-phs-300-and-an-att-usbconnect-mercury/">Getting online with a CradlePoint PHS-300 and an AT&#038;T USBConnect Mercury</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>Anyone who has used a 3G ExpressCard or USB stick knows how handy they can be when you need internet access away from home (and away from Wi-Fi).  I've run into some situations recently where I needed to share my 3G connection with more than one device without using internet sharing on my MacBook Pro.</p>
<p><a href="http://rackerhacker.com/wp-content/uploads/2011/12/phs300.jpg"><img src="http://rackerhacker.com/wp-content/uploads/2011/12/phs300-300x300.jpg" alt="" title="phs300" width="300" height="300" class="alignright size-medium wp-image-2691" /></a>That led me to pick up a CradlePoint PHS-300 (discontinued by the manufacturer, but available from <a href="http://www.amazon.com/CradlePoint-PHS300-Personal-Hotspot-Wireless/dp/B001212ELY">Amazon</a> for about $35).  It's compatible with my AT&#038;T USBConnect Mercury (a.k.a. Sierra Wireless Compass 885/885U) USB stick.</p>
<p>Configuring the PHS-300 was extremely easy since I could just associate with the wireless network and enter the password printed on the bottom of the unit.  However, getting the 3G stick to work was an immense pain.  If you're trying to pair up these products, these steps should help:</p>
<ul>
<li>Access the PHS-300's web interface</li>
<li>Click the <b>Modem</b> tab</li>
<li>Click <b>Settings</b> on the left</li>
<li>Click <b>Always on</b> under <b>Reconnect Mode</b></li>
<li>Uncheck <b>Aggressive Modem Reset</b></li>
<li>Put the following into the <b>AT Dial Script</b> text box:

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">ATE0V1&amp;F&amp;D2&amp;C1S0=0
ATDT*99***1#</pre></div></div>

</li>
<li>Add <code>ISP.CINGULAR</code> to the <b>Access Point Name (APN)</b> box</li>
<li>Flip the <b>Connect Mode</b> under <b>Dual WiMAX/3G Settings</b> to <b>3G Only</b></li>
<li>Scroll up and push <b>Save Settings</b> and then <b>Reboot Now</b></li>
</ul>
<p>Once the PHS-300 reboots, the USB stick may light up, then turn off, and the display on the PHS-300 might show a red light for the 3G card.  Wait about 10-15 seconds for the light to turn green.  The lights on the 3G stick should be glowing and blinking as well.</p>
<p><strong>So how did I figure this out?</strong></p>
<p>After scouring Google search results, Sierra Wireless FAQ's, CradlePoint's support pages, and trolling through minicom (yes, minicom), I thought I'd try connecting with my MacBook Pro using the 3G Watcher application provided by Sierra Wireless.  Before connecting, I opened up Console.app and watched the <code>ppp.log</code> file.  Sure enough, two lines popped up that were quite relevant to my interests:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">Fri Dec 16 00:37:51 2011 : Initializing phone: ATE0V1&amp;F&amp;D2&amp;C1S0=0
Fri Dec 16 00:37:51 2011 : Dialing: ATDT*99***1#</pre></div></div>

<p>I didn't have the exact initialization string in the PHS-300 and that was the cause of the failure the entire time.</p>
<p>If you'd like to talk to your USBConnect Mercury stick with minicom, just install minicom from macports (<code>sudo port -v install minicom</code>) and start it up like so:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">sudo minicom -D /dev/cu.sierra04</pre></div></div>

<p>For other Sierra Wireless cards and adapters, there's a <a href="http://mycusthelp.net/SIERRAWIRELESS/_cs/AnswerDetail.aspx?aid=7">helpful page</a> on Sierra Wireless' site for Eee PC users.</p>
<p><a href="http://rackerhacker.com/2011/12/16/getting-online-with-a-cradlepoint-phs-300-and-an-att-usbconnect-mercury/">Getting online with a CradlePoint PHS-300 and an AT&#038;T USBConnect Mercury</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/2011/12/16/getting-online-with-a-cradlepoint-phs-300-and-an-att-usbconnect-mercury/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Live upgrade Fedora 15 to Fedora 16 using yum</title>
		<link>http://rackerhacker.com/2011/11/14/live-upgrading-fedora-15-to-fedora-16-using-yum/</link>
		<comments>http://rackerhacker.com/2011/11/14/live-upgrading-fedora-15-to-fedora-16-using-yum/#comments</comments>
		<pubDate>Tue, 15 Nov 2011 04:37:39 +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[linux]]></category>
		<category><![CDATA[preupgrade]]></category>
		<category><![CDATA[raid]]></category>
		<category><![CDATA[red hat]]></category>
		<category><![CDATA[scientific linux]]></category>
		<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[yum]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=2623</guid>
		<description><![CDATA[Before we get started, I really ought to drop this here: Upgrading Fedora via yum is not the recommended method. Your first choice for upgrading Fedora should be to use preupgrade. Seriously. This begs the question: When should you use another method to upgrade Fedora? What other methods are there? You have a few other [...]<p><a href="http://rackerhacker.com/2011/11/14/live-upgrading-fedora-15-to-fedora-16-using-yum/">Live upgrade Fedora 15 to Fedora 16 using yum</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>Before we get started, I really ought to drop this here:</p>
<blockquote style="color: red; font-weight: bold;"><p>Upgrading Fedora via yum is <u>not</u> the recommended method.  Your first choice for upgrading Fedora should be to use <code>preupgrade</code>.  Seriously.</p></blockquote>
<p><a href="http://rackerhacker.com/wp-content/uploads/2011/11/Logo_fedoralogo.png"><img src="http://rackerhacker.com/wp-content/uploads/2011/11/Logo_fedoralogo-300x91.png" alt="" title="Logo_fedoralogo" width="300" height="91" class="alignright size-medium wp-image-2662" /></a>This begs the question: <em>When should you use another method to upgrade Fedora? What other methods are there?</em></p>
<p>You have a few other methods to get the upgrade done:</p>
<ul>
<li><strong>Toss in a CD or DVD:</strong> You can upgrade via the anaconda installer provided on the CD, DVD or netinstall media.  My experiences with this method for Fedora (as well as CentOS, Scientific Linux, and Red Hat) haven't been too positive, but your results may vary.</li>
<li><strong>Download the newer release's fedora-release RPM, install it with <code>rpm</code>, and <code>yum upgrade</code>:</strong> This is the really old way of doing things.  Don't try this (read the next bullet).</li>
<li><strong>Use <code>yum</code>'s distro-sync functionality:</strong> If you can't go the <code>preupgrade</code> route, I'd recommend giving this a try.  However, leave plenty of time to fix small glitches after it's done (and after your first reboot).</li>
</ul>
<p><strong>Personal anecdote time</strong> <em>(Keep scrolling for the meat and potatoes)</em><br />
I have a dedicated server at <a href="http://joesdatacenter.com/">Joe's Datacenter</a> (love those folks) with IPMI and KVM-over-LAN access.  The <code>preupgrade</code> method won't work for me because my <code>/boot</code> partition is on a software RAID volume.  There's a <a href="https://bugzilla.redhat.com/show_bug.cgi?id=504826">rat's nest of a Bugzilla ticket</a> over on Red Hat's site about this problem.  I'm really only left with a live upgrade using <code>yum</code>.</p>
<p><strong>Live <code>yum</code> upgrade process</strong><br />
Before even beginning the upgrade, I double-checked that I'd applied all of the available updates for my server.  Once that was done, I realized I was one kernel revision behind and I rebooted to ensure I was in the latest Fedora 15 kernel.</p>
<p>A good practice here is to run <code>package-cleanup --orphans</code> (it's in the <code>yum-utils</code> package) to find any packages which don't exist on any Fedora mirrors.  In my case, I had two old kernels and a JungleDisk package.  I removed the two old kernels (probably wasn't necessary) and left JungleDisk alone (it worked fine after the upgrade).  If you have any external repositories, such as Livna or RPMForge, you may want to disable those until the upgrade is done.  Should the initial upgrade checks bomb out, try adding as few repositories back in as possible to see if it clears up the problem.</p>
<p>Once you make it this far, just follow the instructions available in Fedora's documentation: <a href="http://fedoraproject.org/wiki/Upgrading_Fedora_using_yum#Fedora_15_-.3E_Fedora_16">Upgrading Fedora using yum</a>.  I set SELinux to permissive mode during the upgrade just in case it caused problems.</p>
<p>I'd recommend skipping the <code>grub2-install</code> portion since your original grub installation will still be present after the upgrade.  If your server has EFI (not BIOS), <b>don't use</b> <code>grub2</code> yet.  Keep an eye on the previously mentioned documentation page to see if the problems get ironed out between <code>grub2</code> and EFI.</p>
<p><b>Before you reboot,</b> be sure to get a list of your active processes and daemons.  After your reboot, some old SysVinit scripts will be converted into Systemd service scripts.  They might not start automatically and you might need to enable and/or start some services.</p>
<p>New to Systemd? This will be an extremely handy resource: <a href="http://fedoraproject.org/wiki/SysVinit_to_Systemd_Cheatsheet">SysVinit to Systemd Cheatsheet</a>.</p>
<p>I haven't seen too many issues after cleaning up some daemons that didn't start properly.  There is a problem between <code>asterisk</code> and SELinux that I haven't nailed down yet but it's not a showstopper.</p>
<p>Good luck during your upgrades.  Keep in mind that Fedora 15 could be EOL'd as early as May or June 20102 when Fedora 17 is released.</p>
<p><a href="http://rackerhacker.com/2011/11/14/live-upgrading-fedora-15-to-fedora-16-using-yum/">Live upgrade Fedora 15 to Fedora 16 using yum</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/2011/11/14/live-upgrading-fedora-15-to-fedora-16-using-yum/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Getting apache, PHP, and memcached working with SELinux</title>
		<link>http://rackerhacker.com/2011/09/07/getting-apache-php-and-memcached-working-with-selinux/</link>
		<comments>http://rackerhacker.com/2011/09/07/getting-apache-php-and-memcached-working-with-selinux/#comments</comments>
		<pubDate>Thu, 08 Sep 2011 03:55:00 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[memcached]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[red hat]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[selinux]]></category>
		<category><![CDATA[sysadmin]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=2516</guid>
		<description><![CDATA[I'm using SELinux more often now on my Fedora 15 installations and I came up against a peculiar issue today on a new server. My PHP installation is configured to store its sessions in memcached and I brought over some working configurations from another server. However, each time I accessed a page which tried to [...]<p><a href="http://rackerhacker.com/2011/09/07/getting-apache-php-and-memcached-working-with-selinux/">Getting apache, PHP, and memcached working 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><a href="http://rackerhacker.com/wp-content/uploads/2011/09/selinux-penguin-125.png"><img src="http://rackerhacker.com/wp-content/uploads/2011/09/selinux-penguin-125.png" alt="SELinux Penguin" title="SELinux Penguin" width="125" height="113" class="alignright size-full wp-image-2532" /></a>I'm using SELinux more often now on my Fedora 15 installations and I came up against a peculiar issue today on a new server.  My PHP installation is configured to store its sessions in memcached and I brought over some working configurations from another server.  However, each time I accessed a page which tried to initiate a session, the page load would hang for about a minute and I'd find this in my apache error logs:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">[Thu Sep 08 03:23:40 2011] [error] [client 11.22.33.44] PHP Warning:  
Unknown: Failed to write session data (memcached). Please verify that 
the current setting of session.save_path is correct (127.0.0.1:11211) 
in Unknown on line 0</pre></div></div>

<p>I ran through my usual list of checks:</p>
<ul>
<li>netstat showed memcached bound to the correct ports/interfaces</li>
<li>memcached was running and I could reach it via telnet</li>
<li>memcached-tool could connect and pull stats from memcached</li>
<li>double-checked my php.ini</li>
<li>tested memcached connectivity via a PHP and ruby script -- they worked</li>
</ul>
<p>Even after all that, I still couldn't figure out what was wrong.  I ran strace on memcached while I ran a curl against the page which creates a session and I found something significant -- memcached wasn't seeing any connections whatsoever at that time.  A quick check of the lo interface with tcpdump showed the same result.  Just before I threw a chair, I remembered one thing:</p>
<p><em>SELinux.</em></p>
<p>A quick check for AVC denials showed the problem:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;"># aureport --avc | tail -n 1
4021. 09/08/2011 03:23:38 httpd system_u:system_r:httpd_t:s0 42 tcp_socket name_connect system_u:object_r:memcache_port_t:s0 denied 31536</pre></div></div>

<p>I'm far from being a guru on SELinux, so I leaned on audit2allow for help:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;"># grep memcache /var/log/audit/audit.log | audit2allow
&nbsp;
#============= httpd_t ==============
#!!!! This avc can be allowed using one of the these booleans:
#     httpd_can_network_relay, httpd_can_network_memcache, httpd_can_network_connect
&nbsp;
allow httpd_t memcache_port_t:tcp_socket name_connect;</pre></div></div>

<p>The boolean we're looking for is <code>httpd_can_network_memcache</code>. Flipping the boolean can be done in a snap:</p>

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

<p>After adjusting the boolean, apache was able to make connections to memcached without a hitch.  My page which created sessions loaded quickly and I could see data being stored in memcached.  If you want to check the status of all of the apache-related SELinux booleans, just use getsebool:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;"># getsebool -a | grep httpd | grep off$
allow_httpd_anon_write --&gt; off
allow_httpd_mod_auth_ntlm_winbind --&gt; off
allow_httpd_mod_auth_pam --&gt; off
allow_httpd_sys_script_anon_write --&gt; off
httpd_can_check_spam --&gt; off
httpd_can_network_connect_cobbler --&gt; off
httpd_can_network_connect_db --&gt; off
httpd_can_network_relay --&gt; off
httpd_can_sendmail --&gt; off
httpd_dbus_avahi --&gt; off
httpd_enable_ftp_server --&gt; off
httpd_enable_homedirs --&gt; off
httpd_execmem --&gt; off
httpd_read_user_content --&gt; off
httpd_setrlimit --&gt; off
httpd_ssi_exec --&gt; off
httpd_tmp_exec --&gt; off
httpd_unified --&gt; off
httpd_use_cifs --&gt; off
httpd_use_gpg --&gt; off
httpd_use_nfs --&gt; off</pre></div></div>

<p>If you're interested in SELinux, a good way to get your feet wet is to head over to the CentOS Wiki and review their <a href="http://wiki.centos.org/HowTos/SELinux">SELinux Howtos</a></p>
<p><a href="http://rackerhacker.com/2011/09/07/getting-apache-php-and-memcached-working-with-selinux/">Getting apache, PHP, and memcached working 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/2011/09/07/getting-apache-php-and-memcached-working-with-selinux/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Highlight IP addresses with a double click in Firefox</title>
		<link>http://rackerhacker.com/2011/08/16/highlight-ip-addresses-with-a-double-click-in-firefox/</link>
		<comments>http://rackerhacker.com/2011/08/16/highlight-ip-addresses-with-a-double-click-in-firefox/#comments</comments>
		<pubDate>Tue, 16 Aug 2011 12:46:07 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=2409</guid>
		<description><![CDATA[My daily work involves working with a large number of servers and one of my frustrations with Firefox is that it's not possible to select an entire IP address with a double click with the default settings. Although it works right out of the box with Safari, you have to make a configuration adjustment in [...]<p><a href="http://rackerhacker.com/2011/08/16/highlight-ip-addresses-with-a-double-click-in-firefox/">Highlight IP addresses with a double click in Firefox</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 daily work involves working with a large number of servers and one of my frustrations with Firefox is that it's not possible to select an entire IP address with a double click with the default settings.  Although it works right out of the box with Safari, you have to make a configuration adjustment in Firefox to get the same behavior.</p>
<p>To change the setting in Firefox, open up a new Firefox tab and go to <code>about:config</code> in the browser.  Paste <code>word_select.stop</code> in the search bar that appears below your tab bar and double click the <code>layout.word_select.stop_at_punctuation</code> line.  It should become bold and the value on the end will flip from true to false.</p>
<p>Go back to another tab and <a href="http://icanhazip.com/">open a web page which displays an IP address</a>.  Double click on any portion of the IP address and Firefox should highlight the entire address.</p>
<p><a href="http://rackerhacker.com/2011/08/16/highlight-ip-addresses-with-a-double-click-in-firefox/">Highlight IP addresses with a double click in Firefox</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/2011/08/16/highlight-ip-addresses-with-a-double-click-in-firefox/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Xen Summit 2011: My Takeways</title>
		<link>http://rackerhacker.com/2011/08/08/xen-summit-2011-my-takeways/</link>
		<comments>http://rackerhacker.com/2011/08/08/xen-summit-2011-my-takeways/#comments</comments>
		<pubDate>Mon, 08 Aug 2011 12:58:54 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[cloud]]></category>
		<category><![CDATA[fun]]></category>
		<category><![CDATA[glusterfs]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[rackspace]]></category>
		<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[xen]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=2391</guid>
		<description><![CDATA[Quite a few people who couldn't make it to Xen Summit 2011 this year asked me to write a post summarizing my takeaways from the event. I'm not generally one to back down from peer pressure, so read on if you're interested about the discussions at this year's Summit. The feeling I had at last [...]<p><a href="http://rackerhacker.com/2011/08/08/xen-summit-2011-my-takeways/">Xen Summit 2011: My Takeways</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/2011/08/xensummit_na11_small.png"><img src="http://rackerhacker.com/wp-content/uploads/2011/08/xensummit_na11_small-300x81.png" alt="Xen Summit 2011 Logo" title="Xen Summit 2011 Logo" width="300" height="81" class="alignright size-medium wp-image-2396" /></a>Quite a few people who couldn't make it to <a href="http://xen.org/community/xensummit.html">Xen Summit 2011</a> this year asked me to write a post summarizing my takeaways from the event.  I'm not generally one to back down from peer pressure, so read on if you're interested about the discussions at this year's Summit.</p>
<p>The feeling I had at last year's summit is that Xen was on the verge of losing traction in the market.  Very few distributions still had Xen support going forward and much of the discussion was around the lack of dom0 support in upstream Linux kernels.  Distribution vendors were hesitant to drag patches forward into modern kernels and this made it much more difficult to get Xen working for many people.</p>
<p><a href="http://rackerhacker.com/wp-content/uploads/2011/08/Photo-Aug-01-5-54-05-PM.jpeg"><img src="http://rackerhacker.com/wp-content/uploads/2011/08/Photo-Aug-01-5-54-05-PM-224x300.jpg" alt="Major at the Golden Gate Bridge" title="Major at the Golden Gate Bridge" width="224" height="300" class="alignleft size-medium wp-image-2404" /></a>This year was quite different.  The number of attendees was up, the <a href="http://www.citrix.com/tv/#videos/4386">venue was much better</a>, and there was an obvious buzz of energy in the room.  As many of the presenters noted, this excitement stemmed from the <a href="http://blog.xen.org/index.php/2011/06/14/linux-3-0-how-did-we-get-initial-domain-dom0-support-there/">upstream dom0 support in Linux 3.0</a>.  This inclusion is a huge win and it helps to drive Xen forward since the developers don't have to worry about dragging patches forward.  They can focus on improving performance, adding features, and tightening security.</p>
<p>Many of the discussions this year focused on security and performance.  Ian Pratt discussed Xen's ability to view memory pages of virtual machines via an API to detect malware running inside the instance.  Memory pages could be identified and marked as not executable or applications could be triggered when a VM attempts to touch a particular memory page.  Also, the whole VM could be frozen if needed.</p>
<p>There's also a big push to bring code out of the dom0 and push it into utility VM's.  Driver domains could manage the network or I/O infrastructure and this would further reduce the amount of privileged code actively running in dom0.  There is already very little code required for the Xen hypervisor itself (much much less than the Linux kernel -- I'm looking at you, <a href="http://en.wikipedia.org/wiki/Kernel-based_Virtual_Machine">KVM</a>) and this reduces the attack surface for potential compromises of the hypervisor.  Some projects even aim to restart driver domains multiple times per minute to ensure that any malicious code injected into those virtual machines can't exist for long periods.</p>
<p>Pradeep Vincent from <a href="http://aws.amazon.com/">Amazon</a> talked about how Amazon uses Xen and the pain points they have with its current architecture.  Much of his discussion was around scaling problems (and we see many of the same issues at <a href="http://www.rackspace.com">Rackspace</a>).  Higher performance could easily be gained by multi-threaded operations in dom0 when attaching block devices and creating virtual network interfaces.  He also saw some areas for performance gains in the pvops I/O code.</p>
<p>Quite a few of the talks centered on the ARM architecture and what Xen is able to do on those systems after <a href="http://www.xen.org/products/xen_arm.html">Samsung published their port in 2008</a>.  HVM is on the way for ARM and it might even show up in Xen 4.2.  Some demos of Xen on mobile phones from Samsung were amazing.  They showed how an attacker could compromise the web browser on the phone with a keylogger, but that application was running in a VM.  Once the user switched back to the phone's main menu, the keylogger couldn't access the keystrokes any longer.  After that, a simple close of the browser killed the VM and destroyed the malicious code.</p>
<p>Xen 4.2 should be available in early 2012 and the feature list is staggering.  Improvements to libxenlight, pvops performance (even in HVM), and guest memory sharing should be available with the new release.  Nested virtualization (run a hypervisor inside a hypervisor) is also coming in Xen 4.2 and I'm sure Xzibit will be a huge fan.  This should streamline hypervisor testing, allow for embedded hypervisor options and extend the capabilities of client hypervisors.  Remus should be available in 4.2 as well, but it might be marked as experimental.  OVMF will be added as a BIOS option for UEFI (along with the standard SeaBIOS) and this should allow for Mac OS X guests.  UEFI allows Windows to boot faster since it switches to PV mode sooner and it allows for simpler platform certification for software vendors.</p>
<p><a href="http://rackerhacker.com/wp-content/uploads/2011/08/OpenStackLogo_270x279.jpg"><img src="http://rackerhacker.com/wp-content/uploads/2011/08/OpenStackLogo_270x279.jpg" alt="" title="OpenStackLogo_270x279" width="180" height="195" class="alignright size-full wp-image-2399" /></a>Mike McClurg's presentation on <a href="http://www.xen.org/products/cloudxen.html">XCP</a> was pretty important to me since Rackspace is a big consumer of <a href="http://www.citrix.com/English/ps2/products/product.asp?contentID=683148">XenServer</a>.  If you're not familiar with XCP, it's basically open-source XenServer which runs on bleeding edge (and sometimes unstable) components.  XCP 1.5 and XenServer 6 should be available in November with Xen 4.1 and Linux 2.6.32.  GPU passthrough, up to 1TB RAM, and disaster recovery will be available.  Another goal for the XCP team is to work closely with OpenStack via Project Olympus.  Mike's vision is to have XCP become the configuration of choice for open source clouds.  <a href="http://blog.xen.org/index.php/2011/07/22/project-kronos/">Project Kronos</a> was also extremely interesting.  It's essentially XCP's XenAPI stack running on Debian and Ubuntu.  You'd be able to install either OS on a physical server and run XCP's services on it for a fully OSS hypervisor.</p>
<p>Konrad Wilk gave an update on Linux pvops and it appears there is a shift to get Xen working well on a desktop.  This includes 3D graphics support, S3/hibernate capabilities and various bug fixes.  There's also a push to get PV functionality into HVM and get HVM functionality into PV.  Driver/device domains were discussed again in Patrick Kolp's talk and he had plenty of graphs showing performance changes when regularly restarting device domains.  The performance dips were almost negligible with 10 second restarts and the security gains were significant.</p>
<p>There were several other great presentations on other topics like <a href="http://www.gluster.org/">GlusterFS</a>, <a href="http://nova.openstack.org/">OpenStack Nova</a>, and <a href="http://cgit.freedesktop.org/~ewalsh/linpicker/">Linpicker</a> (from the NSA!).  If these types of things interests you, keep your eyes peeled for Xen Summit 2012 next year.  The <a href="http://weatherspark.com/#!dashboard;q=santa+clara,+ca">weather in the bay area</a> is well worth the trip. <img src='http://rackerhacker.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p><a href="http://rackerhacker.com/2011/08/08/xen-summit-2011-my-takeways/">Xen Summit 2011: My Takeways</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/2011/08/08/xen-summit-2011-my-takeways/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Xen 4.1 on Fedora 15 with Linux 3.0</title>
		<link>http://rackerhacker.com/2011/08/05/xen-4-1-on-fedora-15-with-linux-3-0/</link>
		<comments>http://rackerhacker.com/2011/08/05/xen-4-1-on-fedora-15-with-linux-3-0/#comments</comments>
		<pubDate>Sat, 06 Aug 2011 04:34:06 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[cloud]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[kernel]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[red hat]]></category>
		<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[virtualization]]></category>
		<category><![CDATA[xen]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=2367</guid>
		<description><![CDATA[If you haven't noticed already, full Xen dom0 support was added in the Linux 3.0 kernel. This means there's no longer a need to drag patches forward from old kernels and work from special branches and git repositories when building a kernel for dom0. Something else you might not have noticed is that the Fedora [...]<p><a href="http://rackerhacker.com/2011/08/05/xen-4-1-on-fedora-15-with-linux-3-0/">Xen 4.1 on Fedora 15 with Linux 3.0</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>If you haven't noticed already, <a href="http://blog.xen.org/index.php/2011/06/02/xen-celebrates-full-dom0-and-domu-support-in-linux-3-0/">full Xen dom0 support</a> was added in the <a href="http://kernelnewbies.org/Linux_3.0">Linux 3.0 kernel</a>.  This means there's no longer a need to drag patches forward from old kernels and work from special branches and git repositories when building a kernel for <a href="http://wiki.xensource.com/xenwiki/Dom0">dom0</a>.</p>
<p>Something else you might not have noticed is that the Fedora kernel team has <a href="https://admin.fedoraproject.org/updates/kernel-2.6.40-4.fc15">quietly slipped Linux 3.0</a> into Fedora 15's update channels in disguise.  Click that link, scroll down, and you'll see <em>"Rebase to 3.0. Version reports as 2.6.40 for compatibility with older userspace."</em>  Although I'm not a fan of calling something what it isn't (2.6.40 doesn't exist on kernel.org), I can understand some of the reasoning behind the choice.</p>
<p>This change makes the Xen installation on Fedora 15 pretty trivial.  To get started, update your kernel to the latest if you're not already on Fedora's 2.6.40 kernels:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">yum -y upgrade kernel</pre></div></div>

<p>We need three more packages (quite a few dependencies will roll in with them):</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">yum -y install xen libvirt python-virtinst</pre></div></div>

<p>The xen package reels in the hypervisor itself along with libraries and command line tools (like xl and xm).  Libvirt gives us easy access to VM management with the <code>virsh</code> command and python-virtinst gives us the handy <code>virt-install</code> command to make OS installations easy.</p>
<p>Once those packages are installed, we need to make some adjustments in your grub configuration.  Open <code>/boot/grub/menu.lst</code> in your text editor of choice and add something like this at the bottom:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">title Fedora + Xen (2.6.40-4.fc15.x86_64)
        root (hd0,1)
	kernel /boot/xen.gz
        module /boot/vmlinuz-2.6.40-4.fc15.x86_64 ro root=/dev/sda1
        module /boot/initramfs-2.6.40-4.fc15.x86_64.img</pre></div></div>

<p>Ensure that the <code>root (hd0,1)</code> is applicable to your system (adjust it if it isn't).  Also, check the kernel version to ensure it matches your installed kernel and adjust the <code>root=</code> portion to match your root volume.  Flip the <code>default</code> line to a value which will boot your new grub entry and ensure the timeout is set to a reasonable number if you need to temporarily switch back to your original grub entry at boot time.  (Hey, we all make mistakes.)</p>
<p>I take one extra precaution and change the <code>UPDATEDEFAULT=yes</code> line to <code>no</code> in <code>/etc/sysconfig/kernel</code>.  This ensures that future kernel updates don't trample the entry you've just made.  Keep in mind that you'll need to manually update your grub configuration when you do kernel upgrades later.</p>
<p>Cross your fingers and reboot.  If your system doesn't reboot properly, reboot it again and choose your old kernel from the grub menu.  Double-check your configuration for fat-fingering and give it another try.  If your system boots and pings but you have no output via a monitor, don't fret.  There's a <a href="http://marc.info/?l=linux-kernel&#038;m=131169794026271&#038;w=2">patch</a> for the problem which <a href="http://marc.info/?l=linux-kernel&#038;m=131169794026271&#038;w=2">should appear soon</a> in Linux 3.0.  The impatient can snag a kernel source RPM, add the patch file, and <a href="http://fedoraproject.org/wiki/Building_a_custom_kernel">build a local kernel</a> (or you can <a href="http://majorhayden.com/RPMS/kernel-3.0.0-1.mhayden.fc16/">download my local build</a> from when I did it).</p>
<p>Log in and verify that you booted into the dom0:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">[root@xenbox ~]# xm dmesg | head -n 5
 __  __            _  _    _   _   ____     __      _ ____  
 \ \/ /___ _ __   | || |  / | / | |___ \   / _| ___/ | ___| 
  \  // _ \ '_ \  | || |_ | | | |__ __) | | |_ / __| |___ \ 
  /  \  __/ | | | |__   _|| |_| |__/ __/ _|  _| (__| |___) |
 /_/\_\___|_| |_|    |_|(_)_(_)_| |_____(_)_|  \___|_|____/</pre></div></div>

<p>Once you're done with that, make sure libvirtd is running:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">/etc/init.d/libvirtd start; chkconfig libvirtd on</pre></div></div>

<p>Try installing a VM:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">virt-install \
  --paravirt \
  --name=testvm \
  --ram=512 \
  --vcpus=4 \
  --file /dev/vmstorage/testvm \
  --graphics vnc,port=5905 --noautoconsole \
  --autostart --noreboot \
  --location=http://mirrors.kernel.org/debian/dists/squeeze/main/installer-amd64/</pre></div></div>

<p>You should have a VM installation underway pretty quickly and it will be visible via port 5905 on the local host.  Enjoy the power and freedom of your brand new <a href="http://en.wikipedia.org/wiki/Hypervisor#Classification">type 1 hypervisor</a>.</p>
<p><a href="http://rackerhacker.com/2011/08/05/xen-4-1-on-fedora-15-with-linux-3-0/">Xen 4.1 on Fedora 15 with Linux 3.0</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/2011/08/05/xen-4-1-on-fedora-15-with-linux-3-0/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Keep all old kernels when upgrading via yum</title>
		<link>http://rackerhacker.com/2011/06/16/keep-all-old-kernels-when-upgrading-via-yum/</link>
		<comments>http://rackerhacker.com/2011/06/16/keep-all-old-kernels-when-upgrading-via-yum/#comments</comments>
		<pubDate>Thu, 16 Jun 2011 12:50:46 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[kernel]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[red hat]]></category>
		<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[yum]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=2336</guid>
		<description><![CDATA[Some might call me paranoid, but I get nervous when my package manager automatically removes a kernel. I logged into my Fedora 15 VM this morning and found this: ================================================================================ Package Arch Version Repository Size ================================================================================ Installing: kernel x86_64 2.6.35.13-92.fc14 updates 22 M Removing: kernel x86_64 2.6.35.11-83.fc14 @updates 104 M &#160; Transaction Summary ================================================================================ Install [...]<p><a href="http://rackerhacker.com/2011/06/16/keep-all-old-kernels-when-upgrading-via-yum/">Keep all old kernels when upgrading via yum</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>Some might call me paranoid, but I get nervous when my package manager automatically removes a kernel.  I logged into my Fedora 15 VM this morning and found this:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">================================================================================
 Package        Arch           Version                   Repository        Size
================================================================================
Installing:
 kernel         x86_64         2.6.35.13-92.fc14         updates           22 M
Removing:
 kernel         x86_64         2.6.35.11-83.fc14         @updates         104 M
&nbsp;
Transaction Summary
================================================================================
Install       1 Package(s)
Remove        1 Package(s)</pre></div></div>

<p>Fedora 15's default behavior is to keep three kernels: the latest one and the two previous versions.  However, this behavior may be counter-productive if you compile your own modules, or if you have compatibility issues with subsequent kernel versions.</p>
<p>You can change how yum handles kernel packages with some simple changes to your <code>/etc/yum.conf</code>.  The <code>installonly_limit</code> option controls how many old packages are kept:</p>
<blockquote><p><strong>installonly_limit</strong> Number of packages listed  in  installonlypkgs to  keep  installed at the same time. Setting to 0 disables this feature. Default is '0'.</p></blockquote>
<p>I disabled the functionality altogether by setting <code>installonly_limit</code> to 0:</p>

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

<p>It's important to keep in mind that you will need to purge these packages from your system yourself now.  Kernel packages can occupy a fair amount of disk space, so make a note to go back and clean them up when you no longer need them.</p>
<p><a href="http://rackerhacker.com/2011/06/16/keep-all-old-kernels-when-upgrading-via-yum/">Keep all old kernels when upgrading via yum</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/2011/06/16/keep-all-old-kernels-when-upgrading-via-yum/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Measure traffic flows with Mikrotik&#039;s RouterOS and ntop on Fedora 15</title>
		<link>http://rackerhacker.com/2011/06/05/measure-traffic-flows-with-mikrotiks-routeros-and-ntop-on-fedora-15/</link>
		<comments>http://rackerhacker.com/2011/06/05/measure-traffic-flows-with-mikrotiks-routeros-and-ntop-on-fedora-15/#comments</comments>
		<pubDate>Sun, 05 Jun 2011 14:58:26 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mikrotik]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[ntop]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=2311</guid>
		<description><![CDATA[It's no secret that I'm a big fan of the RouterBoard network devices paired with Mikrotik's RouterOS. I discovered today that these devices offer Cisco NetFlow-compatible statistics gathering which can be directed to a Linux box running ntop. Mikrotik calls it "traffic flow" and it's much more efficient than setting up a mirrored or spanned [...]<p><a href="http://rackerhacker.com/2011/06/05/measure-traffic-flows-with-mikrotiks-routeros-and-ntop-on-fedora-15/">Measure traffic flows with Mikrotik's RouterOS and ntop on Fedora 15</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://www.routerboard.com/">RouterBoard</a> network devices paired with <a href="http://www.mikrotik.com/software.html">Mikrotik's RouterOS</a>.  I discovered today that these devices offer Cisco NetFlow-compatible statistics gathering which can be directed to a Linux box running <a href="http://www.ntop.org/">ntop</a>.  Mikrotik calls it "traffic flow" and it's much more efficient than setting up a mirrored or spanned port and then using ntop to dump traffic on that interface.</p>
<p>These instructions are for Fedora 15, but they should be pretty similar on most other Linux distributions.  Install ntop first:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">yum -y install ntop</pre></div></div>

<p>Adjust <code>/etc/ntop.conf</code> so that ntop listens on something other than localhost:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;"># limit ntop to listening on a specific interface and port
--http-server 0.0.0.0:3000 --https-server 0.0.0.0:3001</pre></div></div>

<p>I had to comment out the <code>sched_yield()</code> option to get ntop to start:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;"># Under certain circumstances, the sched_yield() function causes the ntop web 
# server to lock up.  It shouldn't happen, but it does.  This option causes 
# ntop to skip those calls, at a tiny performance penalty.
# --disable-schedyield</pre></div></div>

<p>Set an admin password for ntop:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">ntop --set-admin-password</pre></div></div>

<p>Once you set the password, you may need to press CTRL-C to get back to a prompt in some ntop versions.</p>
<p>Start ntop:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">/etc/init.d/ntop start</pre></div></div>

<p>Open a web browser and open http://example.com:3000 to access the ntop interface.  Roll your mouse over the <strong>Plugins</strong> menu, then <strong>NetFlow</strong>, and then click <strong>Activate</strong>.  Roll your mouse over the <strong>Plugins</strong> menu again, then <strong>NetFlow</strong>, and then click <strong>Configure</strong>.  Click <strong>Add NetFlow Device</strong> and fill in the following:</p>
<ul>
<li>Type "Mikrotik" in the <strong>NetFlow Device</strong> section and click <b>Set Interface Name</b>.</li>
<li>Type 2055 in the <strong>Local Collector UDP Port</strong> section and click <b>Set Port</b>.</li>
<li>Type in your router's IP/netmask in the <strong>Virtual NetFlow Interface Network Address</strong> section and click <b>Set Interface Address</b>.</li>
</ul>
<p>Enabling traffic flow on the Mikrotik can be done with just two configuration lines:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">/ip traffic-flow
set enabled=yes interfaces=all
/ip traffic-flow target
add address=192.168.10.65:2055 disabled=no version=5</pre></div></div>

<p>Wait about a minute and then try reviewing some of the data in the ntop interface.  Depending on the amount of traffic on your network, you might see data in as little as 10-15 seconds.</p>
<p><a href="http://rackerhacker.com/2011/06/05/measure-traffic-flows-with-mikrotiks-routeros-and-ntop-on-fedora-15/">Measure traffic flows with Mikrotik's RouterOS and ntop on Fedora 15</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/2011/06/05/measure-traffic-flows-with-mikrotiks-routeros-and-ntop-on-fedora-15/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Strategies for detecting a compromised Linux server</title>
		<link>http://rackerhacker.com/2011/03/09/strategies-for-detecting-a-compromised-linux-server/</link>
		<comments>http://rackerhacker.com/2011/03/09/strategies-for-detecting-a-compromised-linux-server/#comments</comments>
		<pubDate>Thu, 10 Mar 2011 02:52:16 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[general advice]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[sysadmin]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=1273</guid>
		<description><![CDATA[There are few things which will rattle systems administrators more than a compromised server. It gives you the same feeling that you would have if someone broke into your house or car, except that it's much more difficult (with a server) to determine how to clean up the compromise and found out how the attacker [...]<p><a href="http://rackerhacker.com/2011/03/09/strategies-for-detecting-a-compromised-linux-server/">Strategies for detecting a compromised Linux server</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>There are few things which will rattle systems administrators more than a compromised server.  It gives you the same feeling that you would have if someone broke into your house or car, except that it's much more difficult (with a server) to determine how to clean up the compromise and found out how the attacker gained access.  In addition, leaving a compromise in place for an extended period can lead to other problems:</p>
<ul>
<li>your server could be used to gain access other servers</li>
<li>data could be stolen from your server's databases or storage devices</li>
<li>an attacker could capture data from your server's local network</li>
<li>denial of service attacks could be launched using your server as an active participant</li>
</ul>
<p>The best ways to limit your server's attack surface are pretty obvious: limit network access, keep your OS packages up to date, and regularly audit any code which is accessible externally or internally.  As we all know, your server can still become compromised even with all of these preventative measures in place.</p>
<p>Here are some tips which will allow you to rapidly detect a compromise on your servers:</p>
<p><strong>Abnormal network usage patterns and atypical bandwidth consumption</strong><br />
Most sites will have a fairly normal traffic pattern which repeats itself daily.  If your traffic graph suddenly has a plateau or spikes drastically during different parts of the day, that could signify that there is something worth reviewing.  Also, if your site normally consumes about 2TB of traffic per month and you're at the 1.5TB mark on the fifth day of the month, you might want to examine the server more closely.</p>
<p>On the flip side, look for dips in network traffic as well.  This may mean that a compromise is interfering with the operation of a particular daemon, or there may be a rogue daemon listening on a trusted port during certain periods.</p>
<p>Many compromises consist of simple scripts which scan for other servers to infect or participate in large denial of service attacks.  The scans may show up as a large amount of packets, but the denial of service attacks will usually consume a large amount of bandwidth.  Keeping tabs on network traffic is easily done with open source software like <a href="http://munin-monitoring.org/">munin</a>, <a href="http://www.cacti.net/">cacti</a>, or <a href="http://oss.oetiker.ch/mrtg/">MRTG</a>.</p>
<p><strong>Unusual open ports</strong><br />
If you run a web server on port 80, but <code>netstat -ntlp</code> shows something listening on various ports over 1024, those processes are worth reviewing.  Use commands like <code>lsof</code> to probe the system for the files and network ports held open by the processes.  You can also check within <code>/proc/[pid]</code> to find the directory where the processes were originally launched.</p>
<p>Watch out for processes started within directories like <code>/dev/shm</code>, <code>/tmp</code> or any directories in which your daemons have write access.  You might see that some processes were started in a user's home directory.  If that's the case, it might be a good time to reset that user's password or clear out their ssh key.  Review the output from <code>last</code> authentication logs to see if there are account logins from peculiar locations.  If you know the user lives in the US, but there are logins from various other countries over a short period, you've got a serious problem.</p>
<p>I've used applications like <a href="http://www.chkrootkit.org/">chkrootkit</a> and <a href="http://www.rootkit.nl/projects/rootkit_hunter.html">rkhunter</a> in the past, but I still prefer a keen eye and <code>netstat</code> on most occasions. </p>
<p><strong>Command output is unusual</strong><br />
I've seen compromises in the past where the attacker actually took the time to replace integral applications like <code>ps</code>, <code>top</code> and <code>lsof</code> to hide the evidence of the ongoing compromise.  However, a quick peek in <code>/proc</code> revealed that there was a lot more going on.</p>
<p>If you suspect a compromise like this one, you may want to use the functionality provided by <code>rpm</code> to verify the integrity of the packages currently installed.  You can quickly hunt for changed files by running <code>rpm -Va | grep ^..5</code>.</p>
<p>Keeping tabs on changing files can be a challenge, but applications like <a href="http://www.tripwire.org/">tripwire</a> and good ol' <a href="http://www.logwatch.org/">logwatch</a> can save you in a pinch.</p>
<p><strong>Summary</strong><br />
We can all agree that the best way to prevent a compromise is to take precautions before putting anything into production.  In real life, something will always be forgotten, so detection is a must.  It's critical to keep in mind that <em>monitoring a server means more than keeping track on uptime</em>.  Keeping tabs on performance anomalies will allow you to find the compromise sooner and that keeps the damage done to a minimum.</p>
<p><a href="http://rackerhacker.com/2011/03/09/strategies-for-detecting-a-compromised-linux-server/">Strategies for detecting a compromised Linux server</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/2011/03/09/strategies-for-detecting-a-compromised-linux-server/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Dual-primary DRBD with OCFS2</title>
		<link>http://rackerhacker.com/2011/02/13/dual-primary-drbd-with-ocfs2/</link>
		<comments>http://rackerhacker.com/2011/02/13/dual-primary-drbd-with-ocfs2/#comments</comments>
		<pubDate>Mon, 14 Feb 2011 02:12:58 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[cluster]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[filesystem]]></category>
		<category><![CDATA[high availability]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[ocfs2]]></category>
		<category><![CDATA[red hat]]></category>
		<category><![CDATA[storage]]></category>
		<category><![CDATA[sysadmin]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=2197</guid>
		<description><![CDATA[As promised in one of my previous posts about dual-primary DRBD and OCFS2, I've compiled a step-by-step guide for Fedora. These instructions should be somewhat close to what you would use on CentOS or Red Hat Enterprise Linux. However, CentOS and Red Hat don't provide some of the packages needed, so you will need to [...]<p><a href="http://rackerhacker.com/2011/02/13/dual-primary-drbd-with-ocfs2/">Dual-primary DRBD with OCFS2</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>As promised in one of my <a href="/2010/12/02/keep-web-servers-in-sync-with-drbd-and-ocfs2/">previous posts</a> about dual-primary DRBD and OCFS2, I've compiled a step-by-step guide for Fedora.  These instructions should be somewhat close to what you would use on CentOS or Red Hat Enterprise Linux.  However, CentOS and Red Hat don't provide some of the packages needed, so you will need to use other software repositories like <a href="http://rpmfusion.org/">RPMFusion</a> or <a href="http://fedoraproject.org/wiki/EPEL">EPEL</a>.</p>
<p>In this guide, I'll be using two Fedora 14 instances in the <a href="http://rackspacecloud.com/">Rackspace Cloud</a> with separate public and private networks.  The instances are called server1 and server2 to make things easier to follow.  </p>
<p><strong>NOTE: All of the instructions below should be done on both servers unless otherwise specified.</strong></p>
<hr />
First, we need to set up DRBD with two primary nodes.  I'll be using loop files for this setup since I don't have access to raw partitions.</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">yum -y install drbd-utils
dd if=/dev/zero of=/drbd-loop.img bs=1M count=1000</pre></div></div>

<p>Put this <a href="/wp-content/uploads/2011/02/loop-for-drbd.txt">loop file initialization init script</a> in /etc/init.d/loop-for-drbd and finish setting it up:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">chmod a+x /etc/init.d/loop-for-drbd
chkconfig loop-for-drbd on
/etc/init.d/loop-for-drbd start</pre></div></div>

<p>Place this DRBD resource file in <code>/etc/drbd.d/r0.res</code>.  Be sure to adjust the server names and IP addresses for your servers.</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">resource r0 {
	meta-disk internal;
	device /dev/drbd0;
	disk /dev/loop7;
&nbsp;
	syncer { rate 1000M; }
        net { 
                allow-two-primaries; 
                after-sb-0pri discard-zero-changes;
                after-sb-1pri discard-secondary;
                after-sb-2pri disconnect;
        }
	startup { become-primary-on both; }
&nbsp;
	on server1 { address 10.181.76.0:7789; }
	on server2 { address 10.181.76.1:7789; }
}</pre></div></div>

<p>The <code>net</code> section is telling DRBD to do the following:</p>
<ul>
<li><em>allow-two-primaries</em> - Generally, DRBD has a primary and a secondary node.  In this case, we will allow both nodes to have the filesystem mounted at the same time.  <strong>Do this only with a clustered filesystem. If you do this with a non-clustered filesystem like ext2/ext3/ext4 or reiserfs, <em>you will have data corruption</em>. Seriously!</strong></li>
<li><em>after-sb-0pri discard-zero-changes</em> - DRBD detected a split-brain scenario, but none of the nodes think they're a primary.  DRBD will take the newest modifications and apply them to the node that didn't have any changes.</li>
<li><em>after-sb-1pri discard-secondary</em> - DRBD detected a split-brain scenario, but one node is the primary and the other is the secondary.  In this case, DRBD will decide that the secondary node is the victim and it will sync data from the primary to the secondary automatically.</li>
<li><em>after-sb-2pri disconnect</em> - DRBD detected a split-brain scenario, but it can't figure out which node has the right data.  It tries to protect the consistency of both nodes by disconnecting the DRBD volume entirely.  You'll have to tell DRBD which node has the valid data in order to reconnect the volume.  <strong>Use extreme caution if you find yourself in this scenario.</strong></li>
</ul>
<p>If you'd like to read about DRBD split-brain behavior in more detail, <a href="http://www.drbd.org/users-guide/s-configure-split-brain-behavior.html">review the documentation</a>.</p>
<p>I generally turn off the usage reporting functionality in DRBD within <code>/etc/drbd.d/global_common.conf</code>:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">global {
	usage-count no;
}</pre></div></div>

<p>Now we can create the volume and start DRBD:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">drbdadm create-md r0
/etc/init.d/drbd start &amp;&amp; chkconfig drbd on</pre></div></div>

<p>You may see some errors thrown about having two primaries but neither are up to date.  That can be fixed by running the following command on the <strong>primary node only</strong>:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">drbdsetup /dev/drbd0 primary -o</pre></div></div>

<p>If you run <code>cat /proc/drbd</code> on the secondary node, you should see the DRBD sync running:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">version: 8.3.8 (api:88/proto:86-94)
srcversion: 299AFE04D7AFD98B3CA0AF9
 0: cs:SyncTarget ro:Secondary/Primary ds:Inconsistent/UpToDate C r----
    ns:0 nr:210272 dw:210272 dr:0 al:0 bm:12 lo:1 pe:2682 ua:0 ap:0 ep:1 wo:b oos:813660  
        [===&gt;................] sync'ed: 20.8% (813660/1023932)K queue_delay: 0.0 ms
        finish: 0:01:30 speed: 8,976 (6,368) want: 1024,000 K/sec</pre></div></div>

<p>Before you go any further, wait for the DRBD sync to fully finish. When it completes, it should look like this:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">version: 8.3.8 (api:88/proto:86-94)
srcversion: 299AFE04D7AFD98B3CA0AF9
 0: cs:Connected ro:Secondary/Primary ds:UpToDate/UpToDate C r----
    ns:0 nr:1023932 dw:1023932 dr:0 al:0 bm:63 lo:0 pe:0 ua:0 ap:0 ep:1 wo:b oos:0</pre></div></div>

<p>Now, <strong>on the secondary node only</strong> make it a primary node as well:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">drbdadm primary r0</pre></div></div>

<p>You should see this on the secondary node if you've done everything properly:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">version: 8.3.8 (api:88/proto:86-94)
srcversion: 299AFE04D7AFD98B3CA0AF9 
 0: cs:Connected ro:Primary/Primary ds:UpToDate/UpToDate C r----
    ns:1122 nr:1119 dw:2241 dr:4550 al:2 bm:1 lo:0 pe:0 ua:0 ap:0 ep:1 wo:b oos:0</pre></div></div>

<p>We're now ready to move on to configuring OCFS2.  Only one package is needed:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">yum -y install ocfs2-tools</pre></div></div>

<p>Ensure that you have your servers and their private IP addresses in <code>/etc/hosts</code> before proceeding.  Create the <code>/etc/ocfs2</code> directory and place the following configuration in <code>/etc/ocfs2/cluster.conf</code> (adjust the server names and IP addresses):</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">cluster:
	node_count = 2          
	name = web
&nbsp;
node:
	ip_port = 7777
	ip_address = 10.181.76.0
	number = 1
	name = server1
	cluster = web
&nbsp;
node:
	ip_port = 7777
	ip_address = 10.181.76.1
	number = 2
	name = server2
	cluster = web</pre></div></div>

<p>Now it's time to configure OCFS2.  Run <code>service ocfs2 configure</code> and follow the prompts.  Use the defaults for all of the responses except for two questions:</p>
<ul>
<li>Answer "y" to "Load O2CB driver on boot"</li>
<li>Answer "web" to "Cluster to start on boot"</li>
</ul>
<p>Start OCFS2 and enable it at boot up:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">chkconfig o2cb on &amp;&amp; chkconfig ocfs2 on
/etc/init.d/o2cb start &amp;&amp; /etc/init.d/ocfs2 start</pre></div></div>

<p>Create an OCFS2 partition <strong>on the primary node only</strong>:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">mkfs.ocfs2 -L &quot;web&quot; /dev/drbd0</pre></div></div>

<p>Mount the volumes and configure them to automatically mount at boot time.  You might be wondering why I do the mounting within <code>/etc/rc.local</code>.  I chose to go that route since mounting via fstab was often unreliable for me due to the incorrect ordering of events at boot time.  Using rc.local allows the mounts to work properly upon every reboot.</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">mkdir /mnt/storage
echo &quot;/dev/drbd0  /mnt/storage  ocfs2  noauto,noatime  0 0&quot; &gt;&gt; /etc/fstab
mount /dev/drbd0
echo &quot;mount /dev/drbd0&quot; &gt;&gt; /etc/rc.local</pre></div></div>

<p>At this point, you should be all done.  If you want to test OCFS2, copy a file into your /mnt/storage mount on one node and check that it appears on the other node.  If you remove it, it should be gone instantly on both nodes.  This is a great opportunity to test reboots of both machines to ensure that everything comes up properly at boot time.</p>
<p><a href="http://rackerhacker.com/2011/02/13/dual-primary-drbd-with-ocfs2/">Dual-primary DRBD with OCFS2</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/2011/02/13/dual-primary-drbd-with-ocfs2/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>FUDCon 2011: Day One</title>
		<link>http://rackerhacker.com/2011/01/30/fudcon-2011-day-one/</link>
		<comments>http://rackerhacker.com/2011/01/30/fudcon-2011-day-one/#comments</comments>
		<pubDate>Sun, 30 Jan 2011 07:33:38 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[boxgrinder]]></category>
		<category><![CDATA[cloudfs]]></category>
		<category><![CDATA[deltacloud]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[fudcon]]></category>
		<category><![CDATA[glusterfs]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[rackspace]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=2181</guid>
		<description><![CDATA[The first day of FUDCon 2011 in Tempe is coming to a close tonight and I'm completely exhausted. As promised, I'll try to summarize the day and cover the talks which I attended. The day started out with Jared Smith's "State of Fedora" address. The audio has already been posted on the wiki, but the [...]<p><a href="http://rackerhacker.com/2011/01/30/fudcon-2011-day-one/">FUDCon 2011: Day One</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 first day of FUDCon 2011 in Tempe is coming to a close tonight and I'm completely exhausted.  <a href="/2011/01/29/gearing-up-for-fudcon-2011/">As promised</a>, I'll try to summarize the day and cover the talks which I attended.</p>
<p>The day started out with <a href="http://fedoraproject.org/wiki/User:Jsmith">Jared Smith's</a> "State of Fedora" address.  The audio has already been <a href="http://fedoraproject.org/w/uploads/4/44/State_of_fedora_tempe_2011.ogg">posted on the wiki</a>, but the speech was very positive overall.  He talked about some of the struggles that have happened in the past and how they'll probably happen again in some form or another.  It was pretty inspirational and you could obviously tell that people in the room were energized by it.</p>
<p>After the address, all of the talks were pitched in <a href="http://en.wikipedia.org/wiki/BarCamp">BarCamp format</a>.  It was a very efficient and entertaining way to create a schedule for the conference.  Everyone had 15-20 seconds to present their talk and then they had to rush outside to post their topic on the wall.  We all had the opportunity to go outside and vote for the talks that sounded interesting.  Once the votes were tallied, the schedule was set and the conference was fully underway.</p>
<p>The first talk for me was about <a href="http://twitter.com/marekgoldmann">Marek Goldmann's</a> <a href="http://www.jboss.org/boxgrinder.html">BoxGrinder</a>. <em>(Note: If you Google for BoxGrinder, make sure that you enter it as a single word. You'll get some wild unrelated results if you use two words.)</em>  In short, BoxGrinder gives you the ability to have a <a href="http://fedoraproject.org/wiki/Anaconda/Kickstart">kickstart</a>-ish method for automatically building images for virtual machine environments.  It's completely <a href="http://community.jboss.org/wiki/BoxGrinderBuildPlugins">plugin-based</a>, so you can have different platform and delivery plugins depending on where your VM needs to be deployed.  For example, you could deploy a VM with BoxGrinder that is in a format for VMWare (platform) and is delivered to the target server via SFTP (delivery).  The public cloud plugins are only compatible with Amazon's products, but I'm eager to change that during one of the upcoming hackfests.</p>
<p>The <a href="http://www.osrg.net/sheepdog/">Sheepdog</a> talk started up right after lunch and although it was interesting, I think it left most people with quite a few questions when it was over.  However, I think people are generally apprehensive when anyone tries to do anything innovative with storage.  Losing data due to a bug is a big concern and many of the questions went deeper into data safety than performance and functionality.</p>
<p>Next up was <a href="http://fedoraproject.org/wiki/Python_in_Fedora_13">Dave Malcolm's</a> talk about the different implementations of python.  This was definitely an eye-opening talk for my coworker and I.  Dave covered CPython, Jython, PyPy and various other implementations and compared their advantages and disadvantages.  I'm still pretty new to Python (I'm clutching on to ruby, PHP and perl still), but this talk really had me thinking about which implementations are best for a particular environment or task.  It was quite a bit of fun to learn about some of the deep underpinnings of Python and how they differ depending on the specific implementation.</p>
<p><a href="http://pl.atyp.us/">Jeff Darcy's</a> talk about <a href="http://fedoraproject.org/wiki/Features/CloudFS">CloudFS</a> was very intriguing.  I've been a fan of <a href="http://www.gluster.org/">GlusterFS</a> recently, but I eventually moved away due to a lack of enterprise features and degrading performance.  Jeff is working to add in encryption and authentication without rewriting the filesystem itself.  There are quite a few tricky problems involved in the encryption portion due to partial writes and general security during the handshake process.  CloudFS could potentially be a network filesystem which could be shared by multiple tenants with their own individual namespaces and segregated UID's.  This could be a big win for providers as they could offer up large amounts of storage in an organized fashion without too many management headaches.</p>
<p>We wrapped up the day of talks with <a href="http://clalance.blogspot.com/">Chris Lalancette's</a> presentation about <a href="http://incubator.apache.org/deltacloud/">Deltacloud</a>.  In short, it's a bag of daemons that allow you to manage multiple public or private clouds.  Everything from image management to provisioning are included in the project.  Questions were raised about whether another application was needed since vendor-specific libraries are abundant and libcloud offers many of the same features in a simpler package.</p>
<p>Tonight's social event was FUDPub at ASU's Memoral Union building.  The food and drinks were excellent (thanks to <a href="http://rackspace.com/">Rackspace</a>!) and it was a great opportunity to relax and talk with other Fedora users and developers.  We had the opportunity to meet people from around the world while playing round after round of bowling and billiards.  The discussions were extremely valuable, but as I said before, it was quite tiring.</p>
<p>I've compiled the FUDCon photos I've taken into a <a href="http://www.flickr.com/photos/texas1emt/sets/72157625935659726/">Flickr photo set</a>.</p>
<p>That's the end of today's summary.  I'll try to keep this going tomorrow as well.  Thanks for reading!</p>
<p><a href="http://rackerhacker.com/2011/01/30/fudcon-2011-day-one/">FUDCon 2011: Day One</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/2011/01/30/fudcon-2011-day-one/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://fedoraproject.org/w/uploads/4/44/State_of_fedora_tempe_2011.ogg" length="8032960" type="audio/ogg" />
		</item>
		<item>
		<title>Gearing up for FUDCon 2011</title>
		<link>http://rackerhacker.com/2011/01/29/gearing-up-for-fudcon-2011/</link>
		<comments>http://rackerhacker.com/2011/01/29/gearing-up-for-fudcon-2011/#comments</comments>
		<pubDate>Sat, 29 Jan 2011 15:01:20 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[fudcon]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=2174</guid>
		<description><![CDATA[FUDCon 2011 in Tempe hasn't even fully started yet, but it's been well worth the trip already. We put quite a few names with faces (or IRC nicks with faces) and discussed our initial forays into Linux when we were young. From what I was told last night, this is the first conference organized by [...]<p><a href="http://rackerhacker.com/2011/01/29/gearing-up-for-fudcon-2011/">Gearing up for FUDCon 2011</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://fedoraproject.org/wiki/FUDCon:Tempe_2011">FUDCon 2011</a> in Tempe hasn't even fully started yet, but it's been well worth the trip already.  We put quite a few names with faces (or IRC nicks with faces) and discussed our initial forays into Linux when we were young.</p>
<p>From what I was told last night, this is the first conference organized by folks not already working for Red Hat (even though some of them were hired on after planning was underway) and presentations are done in <a href="http://barcamp.org/">BarCamp format</a>.  This morning kicks off with the BarCamp pitches themselves and they are supposed to last only 20 seconds each.  I'm new to this format of conferences but I'm eager to see how it works.</p>
<p>Quite a few people on Twitter have asked me if I could toss some summaries of some of the talks onto the blog.  I will certainly try my best to do so!</p>
<p>Here's a sampling of the photos I've taken so far:</p>
<ul>
<li><a href="http://rkrh.kr/1296241117.jpg">iPad being used as a laptop</a></li>
<li><a href="http://rkrh.kr/1296265179.jpg">List of sponsors (hey, it's Rackspace!)</a></li>
<li><a href="http://thesocialnerd.com/best-job-title-ever-written">Ian Weller has a great job title</a></li>
<li><a href="http://thesocialnerd.com/everybody-needs-a-little-loaf-love">Strange "Loaf Love" truck in the hotel parking lot</a></li>
<li><a href="http://thesocialnerd.com/qr-barcodes-at-fudcon-are-a-great-idea">My conference badge along with a handy QR barcode</a></li>
<li><a href="http://thesocialnerd.com/sunrise-over-tempe-arizona">Sunrise over Tempe</a></li>
</ul>
<p><a href="http://rackerhacker.com/2011/01/29/gearing-up-for-fudcon-2011/">Gearing up for FUDCon 2011</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/2011/01/29/gearing-up-for-fudcon-2011/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Single boot Linux on an Intel Mac Mini</title>
		<link>http://rackerhacker.com/2011/01/26/single-boot-linux-on-an-intel-mac-mini/</link>
		<comments>http://rackerhacker.com/2011/01/26/single-boot-linux-on-an-intel-mac-mini/#comments</comments>
		<pubDate>Wed, 26 Jan 2011 13:32:53 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=2168</guid>
		<description><![CDATA[After reading the title of this post, you might wonder "Why would someone pay for a Mac Mini and then not use OS X with it?" Well, if you have a somewhat older Mac Mini you want to use as a server with Linux, these instructions will come in handy. To get started, you'll need [...]<p><a href="http://rackerhacker.com/2011/01/26/single-boot-linux-on-an-intel-mac-mini/">Single boot Linux on an Intel Mac Mini</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>After reading the title of this post, you might wonder "Why would someone pay for a Mac Mini and then not use OS X with it?"  Well, if you have a somewhat older Mac Mini you want to use as a server with Linux, these instructions will come in handy.</p>
<p>To get started, you'll need a few things:</p>
<ul>
<li>Mac OS X Install Disc</li>
<li>Your <a href="http://mirror.rackspace.com/fedora/releases/">favorite</a> Linux distribution's install or live CD/DVD</li>
<li>A CD with <a href="http://refit.sourceforge.net/">refit</a> on it</li>
</ul>
<p>First off, boot the Mac into your normal OS X installation first and mute the sound.  This will get rid of the Mac chime on bootup.  It's really difficult to get this done properly outside of OS X, so take the time to do it now.  Put your Linux CD/DVD in the drive and reboot.  While it's rebooting, hold down the Option key (alt key if you're using a PC keyboard) and you'll have the option to boot from the disc when it boots up.  The boot screen might say "Windows" for the Linux CD/DVD, but choose it anyway.</p>
<p>When I installed Fedora, I had to switch the hard drive's partition table from GPT to a plain old "msdos" partition table.  Hop into a terminal, start <code>parted</code> on your main hard disk and type <code>mklabel msdos</code>.  This will instantly erase the hard drive -- make sure you're ready for this step.  If you're using an anaconda-based installation, you can get to a root shell by pressing CTRL-ALT-F2.  When you're done with <code>parted</code> in that terminal, switch back to anaconda with CTRL-ALT-F6.</p>
<p>At this point, you shouldn't have any partitions on your disk and you'll be ready to install your Linux distribution normally.  I generally put everything in one giant partition as it makes the "bless" step a little easier later on.</p>
<p>Eject the Linux CD/DVD once the installation is complete and toss in the refit CD that you burned previously.  Reboot the Mini again while holding Option (or alt key) and choose the disc again at bootup.  When refit appears, choose the second icon from the left in the bottom row and press enter.  It might say that your GPT partition is empty -- that's okay.</p>
<p>Reboot again, but hold down the Eject key (or F12 on PC keyboards) during boot to eject the refit disc.  Pop in the OS X install disc (may need to reboot again to get it to boot) and open a terminal once the install disc fully boots.  Once you're in the terminal, run <code>diskutil list</code> to figure out which partition is your boot partition.  If you did one giant partition, this should be <code>/dev/disk0s1</code>.  Just "bless" the partition to make it valid for booting:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">bless --device /dev/disk0s1 --setBoot --legacy --verbose</pre></div></div>

<p>Reboot again while holding Eject (or F12) to get the OS X disc out of the drive.  At this point, you should be ready to go for hands-off booting.  My Mac Mini went through about 10-20 seconds of wild screen flickering from grey to black to grey to black but then I saw the familiar Fedora framebuffer.</p>
<p>If you intend to run the Mac Mini headless with Linux, you're going to run into a problem.  The legacy BIOS used to boot Linux requires a monitor to be attached, but there are <a href="http://soledadpenades.com/2009/02/10/mac-mini-as-a-headless-server/">some workarounds</a>.  Also, if you want the Mini to power back on in case of a power failure, just run this at each boot:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">setpci -s 0:1f.0 0xa4.b=0</pre></div></div>

<p>Helpful resources:<br />
<a href="http://mac.linux.be/content/single-boot-linux-without-delay">http://mac.linux.be/content/single-boot-linux-without-delay</a><br />
<a href="http://www.alphatek.info/2009/07/22/natively-run-fedora-11-on-an-intel-mac/">http://www.alphatek.info/2009/07/22/natively-run-fedora-11-on-an-intel-mac/</a></p>
<p><a href="http://rackerhacker.com/2011/01/26/single-boot-linux-on-an-intel-mac-mini/">Single boot Linux on an Intel Mac Mini</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/2011/01/26/single-boot-linux-on-an-intel-mac-mini/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Using GNU sort to sort a list by IP address</title>
		<link>http://rackerhacker.com/2011/01/06/using-gnu-sort-to-sort-a-list-by-ip-address/</link>
		<comments>http://rackerhacker.com/2011/01/06/using-gnu-sort-to-sort-a-list-by-ip-address/#comments</comments>
		<pubDate>Thu, 06 Jan 2011 13:52: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[sysadmin]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=2100</guid>
		<description><![CDATA[My daily work requires me to work with a lot of customer data and much of it involves IP address allocations. If you find that you need to sort a list by IP address with GNU sort on a Linux server, just use these handy arguments for sort: sort -n -t . -k 1,1 -k [...]<p><a href="http://rackerhacker.com/2011/01/06/using-gnu-sort-to-sort-a-list-by-ip-address/">Using GNU sort to sort a list by IP address</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 <a href="http://rackspace.com/">daily work</a> requires me to work with a lot of customer data and much of it involves IP address allocations.  If you find that you need to sort a list by IP address with GNU sort on a Linux server, just use these handy arguments for sort:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">sort -n -t . -k 1,1 -k 2,2 -k 3,3 -k 4,4 somefile.txt</pre></div></div>

<p><em>For this to work, the file you're sorting needs to have the IP address as the first item on each line.</em></p>
<p><a href="http://rackerhacker.com/2011/01/06/using-gnu-sort-to-sort-a-list-by-ip-address/">Using GNU sort to sort a list by IP address</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/2011/01/06/using-gnu-sort-to-sort-a-list-by-ip-address/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Accessing Rackspace Cloud Servers and Slicehost slices privately via OpenVPN</title>
		<link>http://rackerhacker.com/2010/11/16/accessing-rackspace-cloud-servers-and-slicehost-slices-privately-via-openvpn/</link>
		<comments>http://rackerhacker.com/2010/11/16/accessing-rackspace-cloud-servers-and-slicehost-slices-privately-via-openvpn/#comments</comments>
		<pubDate>Tue, 16 Nov 2010 13:52:53 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[cloud]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[networkmanager]]></category>
		<category><![CDATA[rackspace]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[slicehost]]></category>
		<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[vpn]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=1889</guid>
		<description><![CDATA[A recent blog post from Mixpanel inspired me to write a quick how-to for Fedora users on using OpenVPN to talk to instances privately in the Rackspace Cloud. The diagram at the right gives an idea of what this guide will allow you to accomplish. Consider a situation where you want to talk to the [...]<p><a href="http://rackerhacker.com/2010/11/16/accessing-rackspace-cloud-servers-and-slicehost-slices-privately-via-openvpn/">Accessing Rackspace Cloud Servers and Slicehost slices privately via OpenVPN</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><div id="attachment_1897" class="wp-caption alignright" style="width: 298px"><a href="http://rackerhacker.com/wp-content/uploads/2010/11/openvpn-to-rackspace-cloud-diagram.png"><img src="http://rackerhacker.com/wp-content/uploads/2010/11/openvpn-to-rackspace-cloud-diagram.png" alt="Diagram: OpenVPN to Rackspace Cloud Servers and Slicehost" title="Diagram: OpenVPN to Rackspace Cloud Servers and Slicehost" width="288" height="248" class="size-full wp-image-1897" /></a><p class="wp-caption-text">Diagram: OpenVPN to Rackspace Cloud Servers and Slicehost</p></div><br />
A recent <a href="http://code.mixpanel.com/openvpn-in-the-rackspace-cloud/">blog post from Mixpanel</a> inspired me to write a quick how-to for Fedora users on using OpenVPN to talk to instances privately in the Rackspace Cloud.</p>
<p>The diagram at the right gives an idea of what this guide will allow you to accomplish.  Consider a situation where you want to talk to the MySQL installation on db1 directly without requiring extra ssh tunnels or MySQL over SSL via the public network.  If you tunnel into one of your instances, you can utilize the private network to talk between your instances very easily.</p>
<p>There's one important thing to keep in mind here: even though you'll be utilizing the private network between your tunnel endpoint and your other instances, your traffic will still traverse the public network.  That means that the instance with your tunnel endpoint will still get billed for the traffic flowing through your tunnel.</p>
<p>You'll only need the openvpn package on the server side:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">yum -y install openvpn</pre></div></div>

<p>Throw down this simple configuration file into /etc/openvpn/server.conf:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">port 1194
proto tcp
dev tun
persist-key
persist-tun
&nbsp;
server 10.66.66.0 255.255.255.0
ifconfig-pool-persist ipp.txt
&nbsp;
#push &quot;route 10.0.0.0 255.0.0.0&quot;
push &quot;route 10.176.0.0 255.248.0.0&quot;
keepalive 10 120
&nbsp;
ca      /etc/openvpn/my_certificate_authority.pem
cert    /home/major/vpn_server_cert.pem
key     /home/major/vpn_server_key.pem
dh      /etc/openvpn/easy-rsa/2.0/keys/dh1024.pem
&nbsp;
status log/openvpn-status.log
verb 3</pre></div></div>

<p>Here's a bit of explanation for some things you may want to configure:</p>
<ul>
<li><code>push</code> - These are the routes that will be sent over the VPN that are pushed to the clients.  If you don't use any IP addresses in the 10.0.0.0/8 network block in your office, you can probably use the commented out line above.  However, you may want to be more specific with the routes if you happen to use any 10.0.0.0/8 space in your office.</li>
<li><code>server</code> - These are the IP addresses that the VPN server will assign and NAT out through the private interface.  I've used a /24 above, but you may want to adjust the netmask if you have a lot of users making tunnels to your VPN endpoint.</li>
<li><code>ca, cert, key</code> - You will need to create a certificate authority as well as a certificate/key pair for your VPN endpoint.  I already use <a href="http://simpleauthority.com/">SimpleAuthority</a> on my Mac to manage some other CA's and certificates, but you can use <a href="http://openvpn.net/index.php/open-source/documentation/miscellaneous/77-rsa-key-management.html">openvpn's easy-rsa</a> scripts if you wish.  They are already included with the openvpn installation.</li>
</ul>
<p>Build your Diffie-Hellman parameters file:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">cd /etc/openvpn/easy-rsa/2.0/ &amp;&amp; ./build-dh</pre></div></div>

<p>Tell iptables that you want to NAT your VPN endpoint traffic out to all 10.x.x.x IP addresses on the private network:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">iptables -t nat -A POSTROUTING -s 10.0.0.0/8 -o eth1 -j MASQUERADE</pre></div></div>

<p>The last step on the server side is to ensure that the kernel will forward packets from the VPN endpoint out through the private interface.  Ensure that your /etc/sysctl.conf looks like this:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;"># Controls IP packet forwarding
net.ipv4.ip_forward = 1</pre></div></div>

<p>Adjusting your sysctl.conf ensures that forwarding is enabled at boot time, but you'll need to enable it on your VPN endpoint right now:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">echo 1 &gt; /proc/sys/net/ipv4/ip_forward</pre></div></div>

<p>Start the openvpn server:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">/etc/init.d/openvpn start</pre></div></div>

<p>If all is well, you should see openvpn listening on port 1194:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">[root@lb2 ~]# netstat -ntlp | grep openvpn
tcp        0      0 0.0.0.0:1194      0.0.0.0:*         LISTEN      2020/openvpn</pre></div></div>

<p>You'll need to configure a client to talk to your VPN now.  This involves three steps: creating a new certificate/key pair for the client (same procedure as making your server certificates), signing the client's certificate with your CA certificate (same one that you used above to sign your server certificates), and then configuring your client application to access the VPN.</p>
<p>There are <strong>many</strong> openvpn clients out there to choose from.</p>
<p>If you're using a Linux desktop, you may want to consider using the <a href="http://geraner.typepad.com/blog/2009/10/how-to-create-an-openvpn-connect-in-linux-version-2.html">built-in VPN functionality in NetworkManager</a>.  For Mac users, I'd highly recommend using <a href="http://www.thesparklabs.com/viscosity/">Viscosity</a> ($9), but there's also <a href="http://code.google.com/p/tunnelblick/">tunnelblick</a> (free).</p>
<p><a href="http://rackerhacker.com/2010/11/16/accessing-rackspace-cloud-servers-and-slicehost-slices-privately-via-openvpn/">Accessing Rackspace Cloud Servers and Slicehost slices privately via OpenVPN</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/2010/11/16/accessing-rackspace-cloud-servers-and-slicehost-slices-privately-via-openvpn/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Securing your ssh server</title>
		<link>http://rackerhacker.com/2010/10/12/securing-your-ssh-server/</link>
		<comments>http://rackerhacker.com/2010/10/12/securing-your-ssh-server/#comments</comments>
		<pubDate>Tue, 12 Oct 2010 22:39:15 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[advice]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[firewall]]></category>
		<category><![CDATA[iptables]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[sysadmin]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=1164</guid>
		<description><![CDATA[One of the most common questions that I see in my favorite IRC channel is: "How can I secure sshd on my server?" There'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 [...]<p><a href="http://rackerhacker.com/2010/10/12/securing-your-ssh-server/">Securing your ssh server</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 most common questions that I see in <a href="irc://irc.freenode.net/slicehost">my favorite IRC channel</a> is: "How can I secure sshd on my server?"  There'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><br />
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'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><br />
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'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><br />
I'm not a big fan of <a href="http://en.wikipedia.org/wiki/Security_through_obscurity">security through obscurity</a> and it doesn'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't help at all.  They'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><br />
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't be able to access your ssh server.</p>
<p><strong>TCP wrappers</strong><br />
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'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'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's extensive documentation</a>.</p>
<p><strong>fail2ban and denyhosts</strong><br />
For those systems administrators who want to take a bit more active stance on blocking brute force attacks, there'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'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><br />
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 "knock" 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><br />
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'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>
<p><a href="http://rackerhacker.com/2010/10/12/securing-your-ssh-server/">Securing your ssh server</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/2010/10/12/securing-your-ssh-server/feed/</wfw:commentRss>
		<slash:comments>19</slash:comments>
		</item>
		<item>
		<title>Installing Xen 4 on Fedora 13</title>
		<link>http://rackerhacker.com/2010/09/10/installing-xen-4-on-fedora-13/</link>
		<comments>http://rackerhacker.com/2010/09/10/installing-xen-4-on-fedora-13/#comments</comments>
		<pubDate>Fri, 10 Sep 2010 13:56:49 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[virtualization]]></category>
		<category><![CDATA[xen]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=1799</guid>
		<description><![CDATA[Installing Xen can be a bit of a challenge for a beginner and it's made especially difficult by distribution vendors who aren't eager to include it in their current releases. I certainly don't blame the distribution vendors for omitting it; the code to support Xen's privileged domain isn't currently in upstream kernels. However, Pasi Kärkkäinen [...]<p><a href="http://rackerhacker.com/2010/09/10/installing-xen-4-on-fedora-13/">Installing Xen 4 on Fedora 13</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>Installing Xen can be a bit of a challenge for a beginner and it's made especially difficult by distribution vendors who aren't eager to include it in their current releases.  I certainly don't blame the distribution vendors for omitting it; the code to support Xen's privileged domain isn't currently in upstream kernels.</p>
<p>However, <a href="http://www.xen.org/community/spotlight/pasi.html">Pasi Kärkkäinen</a> has written a <a href="http://wiki.xensource.com/xenwiki/Fedora13Xen4Tutorial">detailed walkthrough</a> about how to get Xen 4 running on Fedora 13.  Although there are quite a few steps involved, it's worked well for me so far.</p>
<p><a href="http://rackerhacker.com/2010/09/10/installing-xen-4-on-fedora-13/">Installing Xen 4 on Fedora 13</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/2010/09/10/installing-xen-4-on-fedora-13/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A simple guide to redundant cloud hosting</title>
		<link>http://rackerhacker.com/2010/08/17/a-simple-guide-to-redundant-cloud-hosting/</link>
		<comments>http://rackerhacker.com/2010/08/17/a-simple-guide-to-redundant-cloud-hosting/#comments</comments>
		<pubDate>Wed, 18 Aug 2010 00:41:16 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[cloud servers]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[filesystem]]></category>
		<category><![CDATA[high availability]]></category>
		<category><![CDATA[iptables]]></category>
		<category><![CDATA[kernel]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[load balancing]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[optimization]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[rackspace]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[slicehost]]></category>
		<category><![CDATA[ssl]]></category>
		<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[yum]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=1771</guid>
		<description><![CDATA[Today, on my 28th birthday, I'm finally delivering on a promise to my readers which I made about two months ago. I've written a guide on how to host a web application redundantly in a cloud environment. While it's still a bit of a rough draft, it should be a good starting point for those [...]<p><a href="http://rackerhacker.com/2010/08/17/a-simple-guide-to-redundant-cloud-hosting/">A simple guide to redundant cloud hosting</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, on my 28th birthday, I'm finally delivering on a promise to my readers which I made about two months ago.  I've <a href="/redundant-cloud-hosting-configuration-guide/">written a guide</a> on how to host a web application redundantly in a cloud environment.  While it's still a bit of a rough draft, it should be a good starting point for those who haven't worked in virtualized environments before.  Also, it may show some of the more experienced systems administrators a new way to do things.</p>
<p>The guide: <a href="/redundant-cloud-hosting-configuration-guide/">Redundant Cloud Hosting Guide</a></p>
<p>As always, if you find anything in the guide that needs improvement, I'm all ears. <img src='http://rackerhacker.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p><a href="http://rackerhacker.com/2010/08/17/a-simple-guide-to-redundant-cloud-hosting/">A simple guide to redundant cloud hosting</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/2010/08/17/a-simple-guide-to-redundant-cloud-hosting/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Very unscientific GlusterFS benchmarks</title>
		<link>http://rackerhacker.com/2010/08/13/very-unscientific-glusterfs-benchmarks/</link>
		<comments>http://rackerhacker.com/2010/08/13/very-unscientific-glusterfs-benchmarks/#comments</comments>
		<pubDate>Fri, 13 Aug 2010 20:55:24 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[benchmarks]]></category>
		<category><![CDATA[glusterfs]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[sysadmin]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=1694</guid>
		<description><![CDATA[I've been getting requests for GlusterFS benchmarks from every direction lately and I've been a bit slow on getting them done. You may suspect that you know the cause of the delays, and you're probably correct. Quite a few different sites argue that the default GlusterFS performance translator configuration from glusterfs-volgen doesn't allow for good [...]<p><a href="http://rackerhacker.com/2010/08/13/very-unscientific-glusterfs-benchmarks/">Very unscientific GlusterFS benchmarks</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've been getting requests for GlusterFS benchmarks from every direction lately and I've been a bit slow on getting them done.  You may suspect that you know the <a href="/2010/07/14/version-2-0-has-arrived/">cause of the delays</a>, and you're probably correct. <img src='http://rackerhacker.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>Quite a few different sites argue that the default GlusterFS performance translator configuration from glusterfs-volgen doesn't allow for good performance.  You can find other sites which say you should stick with the defaults that come from the script.  I decided to run some simple tests to see which was true in my environment.</p>
<p>Here's the testbed:</p>
<ul>
<li>GlusterFS 3.0.5 running on RHEL 5.4 Xen guests with ext3 filesystems
</li>
<li>one GlusterFS client and two GlusterFS servers are running in separate Xen guests</li>
<li>cluster/replicate translator is being used to keep the servers in sync</li>
<li>the instances are served by a gigabit network</li>
</ul>
<p>It's about time for some pretty graphs, isn't it?</p>
<div style="text-align: center;">
<a href="http://rackerhacker.com/wp-content/uploads/2010/08/iozone-rereader-glusterfs-default-translators.png"><img src="http://rackerhacker.com/wp-content/uploads/2010/08/iozone-rereader-glusterfs-default-translators-255x300.png" alt="iozone re-reader benchmark results with default glusterfs translators from glusterfs-volgen" title="iozone re-reader benchmark results with default glusterfs translators from glusterfs-volgen" width="255" height="300" class="alignnone size-medium wp-image-1720" style="padding-right: 25px;"/></a><a href="http://rackerhacker.com/wp-content/uploads/2010/08/iozone-rereader-glusterfs-without-translators.png"><img src="http://rackerhacker.com/wp-content/uploads/2010/08/iozone-rereader-glusterfs-without-translators-254x300.png" alt="iozone re-reader benchmark results with no glusterfs translators" title="iozone re-reader benchmark results with no glusterfs translators" width="254" height="300" class="alignnone size-medium wp-image-1721" /></a>
</div>
<div style="clear:both;"></div>
<p>The test run on the left used default stock <a href="http://pastebin.com/MAX1kWDg">client</a> and <a href="http://pastebin.com/uyE6qkZ6">server</a> volume files as they come from glusterfs-volgen.  The test run on the right used a <a href="http://pastebin.com/gqMquRpB">client volume file with no performance translators</a> (the server volume file was untouched).  Between each test run, the GlusterFS mount was unmounted and remounted.  I repeated this process four times (for a total of five runs) and averaged the data.</p>
<p><em>You'll have to forgive the color mismatches and the lack of labeling on the legend (that's KB/sec transferred) as I'm far from an Excel expert.</em></p>
<p>The graphs show that running without any translators at all will drastically hinder read caching in GlusterFS -- exactly as I expected.  Without any translators, the performance is very even across the board.  Since my instances had 256MB of RAM each, their iocache translator was limited to about 51MB of cache.  That's reflected in the graph on the left -- look for the vertical red/blue divider between the 32MB and 64MB file sizes.  I'll be playing around with that value soon to see how it can improve performance for large and small files.</p>
<p>Keep in mind that this test was very unscientific and your results may vary depending on your configuration.  While I hope to have more detailed benchmarks soon, this should help some of the folks who have been asking for something basic and easy to understand.</p>
<p><a href="http://rackerhacker.com/2010/08/13/very-unscientific-glusterfs-benchmarks/">Very unscientific GlusterFS benchmarks</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/2010/08/13/very-unscientific-glusterfs-benchmarks/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>One month with GlusterFS in production</title>
		<link>http://rackerhacker.com/2010/08/11/one-month-with-glusterfs-in-production/</link>
		<comments>http://rackerhacker.com/2010/08/11/one-month-with-glusterfs-in-production/#comments</comments>
		<pubDate>Wed, 11 Aug 2010 13:29:02 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[glusterfs]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=1680</guid>
		<description><![CDATA[As many of you might have noticed from my previous GlusterFS blog post and my various tweets, I've been working with GlusterFS in production for my personal hosting needs for just over a month. I've also been learning quite a bit from some of the folks in the #gluster channel on Freenode. On a few [...]<p><a href="http://rackerhacker.com/2010/08/11/one-month-with-glusterfs-in-production/">One month with GlusterFS in production</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>As many of you might have noticed from my <a href="/2010/05/27/glusterfs-on-the-cheap-with-rackspaces-cloud-servers-or-slicehost/">previous GlusterFS blog post</a> and my <a href="http://twitter.com/rackerhacker">various tweets</a>, I've been working with GlusterFS in production for my personal hosting needs for just over a month.  I've also been learning quite a bit from some of the folks in the <a href="http://java.freenode.net/index.php?channel=gluster">#gluster</a> channel on <a href="http://freenode.net/">Freenode</a>.  On a few occasions I've even been able to help out with some configuration problems from other users.</p>
<p>There has been quite a bit of interest in GlusterFS as of late and I've been inundated with questions from coworkers, other system administrators and developers.  Most folks want to know about its reliability and performance in demanding production environments.  I'll try to do my best to cover the big points in this post.</p>
<p><strong>First off, here's now I'm using it in production:</strong> I have two web nodes that keep content in sync for various web sites.  They each run a GlusterFS server instance and they also mount their GlusterFS share.  I'm using the <a href="http://www.gluster.com/community/documentation/index.php/Translators/cluster/replicate">replicate translator</a> to keep both web nodes in sync with client side replication.</p>
<p>Here are my impressions after a month:</p>
<p><b>I/O speed is often tied heavily to network throughput</b><br />
This one may seem obvious, but it's not always true in all environments.  If you deal with a lot of small files like I do, a 40mbit/sec link between the Xen guests is plenty.  Adding extra throughput didn't add any performance to my servers.  However, if you wrangle large files on your servers regularly, you may want to consider higher throughput links between your servers.  I was able to push just under 900mbit/sec by using dd to create a large file within a GlusterFS mount.</p>
<p><b>Network and I/O latency are big factors for small file performance</b><br />
If you have a busy network and the latency creeps up from time to time, you'll find that your small file performance will drop significantly (especially with the replicate translator).  Without getting too nerdy (you're welcome to read the <a href="http://ftp.zresearch.com/pub/gluster/glusterfs/doc/afr.pdf">technical document on replication</a>), replication is an intensive process.  When a file is accessed, the client goes around to each server node to ensure that it not only has a copy of the file being read, but that it has the <em>correct</em> copy.  If a server didn't save a copy of a file (due to disk failure or the server being offline when the file was written), it has to be synced across the network from one of the good nodes.</p>
<p>When you write files on replicated servers, the client has to roll through the same process first.  Once that's done, it has to lock the file, write to the change log, then do the write operation, drop the change log entries, and then unlock the file.  All of those operations must be done on <em>all of the servers</em>.  High latency networks will wreak havoc on this process and cause it to take longer than it should.</p>
<p>It's quite obvious that if you have a fast, low-latency network between your servers, slow disks can still be a problem.  If the client is waiting on the server nodes' disks to write data, the read and write performance will suffer.  I've tested this in environments with fast networks and very busy RAID arrays.  Even if the network was very underutilized, slow disks could cut performance drastically.</p>
<p><b>Monitoring GlusterFS isn't easy</b><br />
When the client has communication problems with the server nodes, some weird things can happen.  I've seen situations where the client loses connections to the servers (see the next section on reliability) and the client mount simply hangs.  In other situations, the client has been knocked offline entirely and the process is missing from the process tree by the time I logged in.  Your monitoring will need to ensure that the mount is active and is responding in a timely fashion.</p>
<p>There's a <a href="http://www.sirgroane.net/2010/04/monitoring-gluster-with-nagios/">handy script</a> which allows you to monitor GlusterFS mounts via nagios that Ian Rogers put together.  Also, you can get some historical data with <a href="http://github.com/acrollet/munin-glusterfs">acrollet's munin-glusterfs plugin</a>.</p>
<p><b>GlusterFS 3.x is pretty reliable</b><br />
When I first started working with GlusterFS, I was using a version from the 2.x tree.  The Fedora package maintainer hadn't updated the package in quite some time, but I figured it should work well enough for my needs.  I found that the small file performance was lacking and the nodes often had communication issues when many files were being accessed or written simultaneously.  This improved when I built my own RPMs of 3.0.4 (and later 3.0.5) and began using those instead.</p>
<p>I did some failure testing by hard cycling the server and client nodes and found some interesting results.  First off, abruptly pulling clients had no effects on the other clients or the server nodes.  The connection eventually timed out and the servers logged the timeout as expected. </p>
<p>Abruptly pulling servers led to some mixed results.  In the 2.x branch, I saw client hangs and timeouts when I abruptly removed a server.  This appears to be mostly corrected in the 3.x branch.  If you're using replicate, it's important to keep in mind that the first server volume listed in your client's volume file is the one that will be coordinating the file and directory locking.  Should that one fall offline quickly, you'll see a hiccup in performance for a brief moment and the next server will be used for coordinating the locking.  When your original server comes back up, the locking coordination will shift back.</p>
<p><b>Conclusion</b><br />
I'm really impressed with how much GlusterFS can do with the simplicity of how it operates.  Sure, you can get better performance and more features (sometimes) from something like Lustre or GFS2, but the amount of work required to stand up that kind of cluster isn't trivial.  GlusterFS really only requires that your kernel have FUSE support (it's been in mainline kernels since 2.6.14).</p>
<p>There are some things that GlusterFS really needs in order to succeed:</p>
<ul>
<li><b>Documentation</b> - The current documentation is often out of date and confusing.  I've even found instances where the documentation contradicts itself.  While there are some good technical documents about the design of some translators, they really ought to do some more work there.</li>
<li><b>Statistics gathering</b> - It's very difficult to find out what GlusterFS is doing and where it can be optimized.  Profiling your environment to find your bottlenecks is nearly impossible with the 2.x and 3.x branches.  It doesn't make it easier when some of the performance translators actually decrease performance.</li>
<li><b>Community involvement</b> - This ties back into the documentation part a little, but it would be nice to see more participation from Gluster employees on IRC and via the mailing lists.  They're a little better with mailing list responses than other companies I've seen, but there is still room for improvement.</li>
</ul>
<p>If you're considering GlusterFS for your servers but you still have more questions, feel free to leave a comment or find me on Freenode (I'm 'rackerhacker').</p>
<p><a href="http://rackerhacker.com/2010/08/11/one-month-with-glusterfs-in-production/">One month with GlusterFS in production</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/2010/08/11/one-month-with-glusterfs-in-production/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>A modern implementation and explanation of Linux Virtual Server (LVS)</title>
		<link>http://rackerhacker.com/2010/06/27/modern-implementation-and-explanation-of-linux-virtual-server-lvs/</link>
		<comments>http://rackerhacker.com/2010/06/27/modern-implementation-and-explanation-of-linux-virtual-server-lvs/#comments</comments>
		<pubDate>Sun, 27 Jun 2010 16:03:27 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[general advice]]></category>
		<category><![CDATA[high availability]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=1529</guid>
		<description><![CDATA[A typical load balancing configuration using hardware devices or software implementations will be organized such that they resemble the diagram at the right. I usually call this a proxy-type load balancing solution since the load balancer proxies your request to some other nodes. The standard order of operations looks like this: client makes a request [...]<p><a href="http://rackerhacker.com/2010/06/27/modern-implementation-and-explanation-of-linux-virtual-server-lvs/">A modern implementation and explanation of Linux Virtual Server (LVS)</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><div id="attachment_1533" class="wp-caption alignright" style="width: 207px"><a href="http://rackerhacker.com/wp-content/uploads/2010/06/loadbalancer-viaproxy.png"><img src="http://rackerhacker.com/wp-content/uploads/2010/06/loadbalancer-viaproxy.png" alt="Load balancing via proxy" title="Load balancing via proxy" width="197" height="206" class="size-full wp-image-1533" /></a><p class="wp-caption-text">Typical configuration for a <br />proxy-type load balancer</p></div>A typical load balancing configuration using hardware devices or software implementations will be organized such that they resemble the diagram at the right.  I usually call this a proxy-type load balancing solution since the load balancer proxies your request to some other nodes.  The standard order of operations looks like this:</p>
<ul>
<li>client makes a request</li>
<li>load balancer receives the request</li>
<li>load balancer sends request to a web node</li>
<li>the web server sends content back to the load balancer</li>
<li>the load balancer responds to the client</li>
</ul>
<p>If you're not familiar with load balancing, here's an analogy.  Consider a fast food restaurant.  When you walk up to the counter and place an order, you're asking the person at the counter (the load balancer) for a hamburger.  The person at the counter is going to submit your order, and then a group of people (web nodes) are going to work on it.  Once your hamburger (web request) is ready, your order will be given to the person at the counter and then back to you.</p>
<p>This style of organization can become a problem as your web nodes begin to scale.  It requires you to ensure that your load balancers can keep up with the requests and sustain higher transfer rates that come from having more web nodes serving a greater number of requests.  Imagine the fast food restaurant where you have one person taking the orders but you have 30 people working on the food.  The person at the counter may be able to take orders very quickly, but they may not be able to keep up with the orders coming out of the kitchen.</p>
<p><div id="attachment_1532" class="wp-caption alignright" style="width: 226px"><a href="http://rackerhacker.com/wp-content/uploads/2010/06/loadbalancer-ipvs.png"><img src="http://rackerhacker.com/wp-content/uploads/2010/06/loadbalancer-ipvs.png" alt="Load balancing via Linux Virtual Server" title="Load balancing via Linux Virtual Server" width="216" height="206" class="size-full wp-image-1532" /></a><p class="wp-caption-text">LVS allows for application servers<br /> to respond to clients directly</p></div><br />
This is where <a href="http://en.wikipedia.org/wiki/Linux_Virtual_Server">Linux Virtual Server (LVS)</a> really shines.  LVS operates a bit differently:</p>
<ul>
<li>client makes a request</li>
<li>load balancer receives the request</li>
<li>load balancer sends request to a web node</li>
<li>the web server sends the response <strong>directly to the client</strong></li>
</ul>
<p>The key difference is that the load balancer sends the unaltered request to the web server and the web server responds <em>directly to the client</em>.  Here's the fast food analogy again.  If you ask the person at the counter (the load balancer) for a hamburger, that person is going to take your order and give it to the kitchen staff (the web nodes) to work on it.  This time around, the person at the counter is going to advise the kitchen staff that the order needs to go directly to you once it's complete.  When your hamburger is ready, a member of the kitchen staff will walk to the counter and give it directly to you.</p>
<p>In the fast food analogy, what are the benefits?  As the number of orders and kitchen staff increases, the job of the person at the counter doesn't drastically increase in difficulty.  While that person will have to handle more orders and keep tabs on which of the kitchen staff is working on the least amount of orders, they don't have to worry about returning food to customers.  Also, the kitchen staff doesn't need to waste time handing orders to the person at the counter.  Instead, they can pass these orders directly to the customer that ordered them.</p>
<p>In the world of servers, this is a large benefit.  Since the web servers' responses no longer pass through the load balancer, they can spend more time on what they do best -- balancing traffic.  This allows for smaller, lower-powered load balancing servers from the beginning.  It also allows for increases in web nodes without big changes for the load balancers.</p>
<p>There are three main implementations of LVS to consider:</p>
<p><a href="http://rackerhacker.com/wp-content/uploads/2010/06/Lvslogo.png"><img src="http://rackerhacker.com/wp-content/uploads/2010/06/Lvslogo.png" alt="Linux Virtual Server Logo" title="Linux Virtual Server Logo" width="206" height="206" class="alignright size-full wp-image-1559" /></a><strong>LVS-DR: Direct Routing</strong><br />
The load balancer receives the request and sends the packet directly to a waiting real server to process.  LVS-DR has the best performance, but all of your servers must be on the same network subnet and they have to be able to share the same router (with no other routing devices in between them).</p>
<p><strong>LVS-TUN: Tunneling</strong><br />
This is very similar to the direct routing approach, but the packets are <a href="http://en.wikipedia.org/wiki/IP_tunnel">encapsulated</a> and sent directly to the real servers once the load balancer receives them.  This removes the restriction that all of the devices must be on the same network.  Thanks to encapsulation, you can use this method to load balance between multiple datacenters.</p>
<p><strong>LVS-NAT: Network Address Translation</strong><br />
Using NAT for LVS yields the least performance and scaling of all of the implementation options.  In this configuration, the incoming requests are rewritten so that they will be transported correctly in a NAT environment.  This puts a bigger burden on the load balancer as it must rewrite the requests quickly while still keeping up with how much work is being done by each web server.</p>
<hr />
<strong>Looking for a Linux Virtual Server HOWTO?</strong> Stay tuned.  I'm preparing one for my next post.</p>
<p><a href="http://rackerhacker.com/2010/06/27/modern-implementation-and-explanation-of-linux-virtual-server-lvs/">A modern implementation and explanation of Linux Virtual Server (LVS)</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/2010/06/27/modern-implementation-and-explanation-of-linux-virtual-server-lvs/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

