Encrypted filesystems and partitions on RHEL 5

I spoke with a customer last week who was curious about enabling encrypted partitions on a DAS connected to their server.  I wasn't entirely sure if it was possible in RHEL 5 since I couldn't remember if it was available in Fedora 6.  According to Red Hat's release notes, it is possible.  Here's an excerpt from their release notes: 

Encrypted Swap Partitions and Non-root File Systems
Red Hat Enterprise Linux 5 now provides basic support for encrypted swap partitions and non-root file systems. To use these features, add the appropriate entries to /etc/crypttab and reference the created devices in /etc/fstab.

Below is a sample /etc/crypttab entry:

my_swap /dev/hdb1 /dev/urandom swap,cipher=aes-cbc-essiv:sha256
This creates the encrypted block device /dev/mapper/my_swap, which can be referenced in /etc/fstab.

Below is a sample /etc/crypttab entry for a file system volume:

my_volume /dev/hda5 /etc/volume_key cipher=aes-cbc-essiv:sha256
The /etc/volume_key file contains a plaintext encryption key. You can also specify none as the key file name; this configures the system to ask for the encryption key during boot instead.

It is recommended to use LUKS (Linux Unified Key Setup) for setting up file system volumes. To do this, follow these steps:

Create the encrypted volume using cryptsetup luksFormat.

Add the necessary entry to /etc/crypttab.

Set up the volume manually using cryptsetup luksOpen (or reboot).

Create a file system on the encrypted volume.

Add the necessary entry to /etc/fstab.

After scouring the Red Hat Enterprise Linux manuals and knowledge base, I couldn't find specific instructions to set it up. However, there was an article in the Red Hat Magazine that may help.

Printed from: http://rackerhacker.com/2008/09/01/encrypted-filesystems-and-partitions-on-rhel-5/ .
© Major Hayden 2012.

1 Comment   »

  • T'POW says:

    you wrote:

    > Our baby is out! I've reproduced! Holy crap, what do I do now?!

    a friend of mine once told me, "you breed 'em, you feed 'em".

    i wish you both the best of luck with your new child. may your new child know peace.

    live long and prosper.
    T'POW

Trackbacks/Pingbacks

  1. Wider implications of the Red Hat breach | T.G.O.H
  2. Wider implications of the Red Hat breach | Survival News Network
  3. xentutorial.com

RSS feed for comments on this post

Leave a Reply

 

  • Welcome! I started this blog as a way to give back to all of the other system administrators who have taught me something in the past. Writing these posts brings me a lot of enjoyment and I hope you find the information useful. If you spot something that's incorrect or confusing, please write a comment and let me know. Drop me a line if there's something you want to know more about and I'll do my best to write a post on the topic.
    -- Major Hayden

    Flattr this