Become a fan of Slashdot on Facebook


Forgot your password?
Data Storage Operating Systems BSD

Building a Fully Encrypted NAS On OpenBSD 196

mistermark writes "Two years ago this community discussed my encrypted file server. That machine has kept running and running up until a failing drive and a power outage this last week. So, it's time to revise everything and add RAID to it as well. Now you can have an on-the-fly encrypting/decrypting NAS with the data security of RAID, all in one. Here is the how-to."
This discussion has been archived. No new comments can be posted.

Building a Fully Encrypted NAS On OpenBSD

Comments Filter:
  • needs usability (Score:4, Interesting)

    by r00t ( 33219 ) on Monday July 16, 2007 @12:25AM (#19873191) Journal
    Right from the initial install, by default, this should work.

    Encrypted backups should be default and easy, with reminders.

    You need multiple keys: whole-system, per-user, and swap. The swap key gets replaced at boot with something random.

    Ultimately, it needs mandatory encryption. This would exclude OpenBSD; you need a mandatory policy framework like SE Linux to make it happen. Mandatory encryption means that normal users are prohibited from removing data from the machine without first encrypting it in an approved way. This most likely solves part of the backup problem. It also reduces the insider threat, while still allowing transfer of data between secure machines.
  • Re:Pretty In-depth (Score:3, Interesting)

    by ComputerSlicer23 ( 516509 ) on Monday July 16, 2007 @01:02AM (#19873373)

    I'm shocked the raid tools for OpenBSD aren't better then that. Not a dig at it, OpenBSD generally prides itself on exceptional tools. OpenSSH, CARP (their replacement for VRRPD), their firewall tools and everything else. Linux has a system call that can be used to monitor the status of a RAID array. It can kick off an arbitrary command, including starting up recovery and/or e-mail alerts. Technically the system call doesn't, but the mdadm tools that use the system call can.

    I really hope somebody replies telling me, I'm an idiot and that OpenBSD has exactly such tools. Well and they really exist, as opposed to the clever slashdot behavior of telling me I'm an idiot and be completely wrong.


  • by JayAEU ( 33022 ) on Monday July 16, 2007 @02:22AM (#19873705)
    Just make sure you don't follow TFA's recommendation regarding the choice of identical drives for the RAID array, which would make the whole point of redundancy moot.

    Identical drives are just that, identical. This means that they also are very likely to fail at the same time or may not survive a RAID reconstruction process to rebuild the other failed drive.

    My advice would be to make them identical only in size and maybe the interface, but for the love of God, do pick different manufacturers and production months for the drives.
  • by Anonymous Coward on Monday July 16, 2007 @02:36AM (#19873735)

    All the *BSD is dying posts are contained in this one post. If you have mod points, please mod this up so that everybody will know that *BSD is dying! No need to post your own, as it will only be redundant!

    Oh, and if I've missed any, please add your troll as a reply and I'll include it in the next Troll-in-one.


    The *BSD Wailing Song

    What's left for me to see
    In my ship I sailed so far
    What can the answer be
    Don't know what the questions are.
    And after all I've done
    Still I cannot feel the sun
    Tell me save me
    In the end our lost souls must repent.
    I must know it is for certain
    Can it be the final curtain
    As long as the wind will blow
    I'll be searching high and low.
    Who knows what's really true
    They say the end is so near
    Why are we all so cruel
    We just fill ourselves with fear.
    And heaven and hell will turn
    All that we love shall burn
    Hear me trust me
    In the end our lost sould must repent.
    I must know it is for certain
    Can it be the final curtain
    As long as the wind will blow
    I'll be searching high and low
    Final curtain
    Final curtain


    • flask of ripe urine
      pressed to bsd lips
      bsd drink up


    I don't want to start a holy war here, but what is the deal with you BSD fanatics? I've been sitting here at my freelance gig in front of a BSD box (a PIII 800 w/512 Megs of RAM) for about 20 minutes now while it attempts to copy a 17 Meg file from one folder on the hard drive to another folder. 20 minutes. At home, on my Pentium Pro 200 running NT 4, which by all standards should be a lot slower than this BSD box, the same operation would take about 2 minutes. If that.

    In addition, during this file transfer, Netscape will not work. And everything else has ground to a halt. Even Emacs Lite is straining to keep up as I type this.

    I won't bore you with the laundry list of other problems that I've encountered while working on various BSD machines, but suffice it to say there have been many, not the least of which is I've never seen a BSD box that has run faster than its Windows counterpart, despite the BSD machines faster chip architecture. My 486/66 with 8 megs of ram runs faster than this 800 mhz machine at times. From a productivity standpoint, I don't get how people can claim that BSD is a "superior" machine.

    BSD addicts, flame me if you'd like, but I'd rather hear some intelligent reasons why anyone would choose to use a BSD over other faster, cheaper, more stable systems.


    It is common knowledge that *BSD is dying. Almost everyone knows that ever hapless *BSD is mired in an irrecoverable and mortifying tangle of fatal trouble. It is perhaps anybody's guess as to which *BSD is the worst off of an admittedly suffering *BSD community. The numbers continue to decline for *BSD but FreeBSD may be hurting the most. Look at the numbers. The erosion of user base for FreeBSD continues in a head spinning downward spiral.

    OpenBSD leader Theo states that there are 7000 users of OpenBSD. How many users of BSD are there? Let's see. The number of OpenBSD versus NetBSD posts on Usenet is roughly in ratio of 5 to 1. Therefore there are about 7000/5 = 1400 NetBSD users. BSD/OS posts on Usenet are about half of the volume of NetBSD posts. Therefore there are about 700 users of BSD/OS. A recent article put FreeBSD at about 80 percent of the *BSD market. Therefore there are (7000+1400+700)*4 = 36400 FreeBSD users. This is consistent with the number of FreeBSD Usenet posts.

    Due to the troubles of Walnut Creek, abysmal sales and so on, FreeBSD went out of business and was taken over by BSDI

  • Re:needs usability (Score:3, Interesting)

    by jd ( 1658 ) <imipak AT yahoo DOT com> on Monday July 16, 2007 @03:48AM (#19874033) Homepage Journal
    Mandatory encryption won't help a whole lot. Mandatory access controls that utilize encryption might help some - it doesn't protect off-site data but DOES limit the device you copy data onto, as the device must be authorized to hold the data. It is then the problem of the device as to how to protect things. Not perfect, but a major improvement, as it means Joe "The Spy" User can't copy onto an unauthorized device to decrypt later at Evil HQ, and Fred "The Idiot" Flintstone can't copy top secret DoD construction plans onto public FTP servers. As has happened, according to reports.

    (The point of MAC is that MAC requires that there be explicit permission given by someone who has the authority to give that permission. It is not implicit, unlike DAC where anything not expressly prohibited is implicitly allowed.)

    The encryption thing can be improved on a little, if it is not secret key -or- uses an OTP calculator that only resides on authorized machines. The latter is getting a little into security through obscurity, but still works to a degree if the calculator is any good and the underlying crypto is sufficiently strong. As async encryption is slow, you'd probably want a crypto accelerator, but there are countless such systems. Don't blame the algorithms if you don't want the solutions.

  • Re:Use UnRaid (Score:1, Interesting)

    by Anonymous Coward on Monday July 16, 2007 @10:48AM (#19876235)
    I use it and it is a charm. The only feature missing is S3 suspend support and wake on lan, which is high on the list of features for the next version.

    Particularly for a server that has large files, but infrequent use (think media server with movies and ISOs) drives can sleep for weeks. So less wear and tear on the drives, less noise, and less power.

    What's the issue with RFS? I don't care if the guy is an axe murderer... the FS is good.
  • by Amouth ( 879122 ) on Monday July 16, 2007 @02:15PM (#19878943)
    interestingly I have had localized brown outs in parts of my house....

    I have underground power and water got into the line.. and one of the legs would drop in voltage for no reason.. so instead of 2 120v legs coming in I had 1 120 and 1 60v leg.. when say the heater would cut on power would bleed across from one leg to the other and things would work but when it turned off anything that was on the 60v side would brown out..

    it was odd as hell.. if I unplugged my fridge then half the house would start working again .. none of it made since - that is until I realized that my power meter wasn't working (one of the new digital ones).. as soon as I turned off the main breaker the power meter would boot up and be good.. so I called the power company.. they strapped a solid state transformer to my house for a week so I could live off of 1 120v leg until they could repair the line...

    but due to over doing UPS's .. none of my computers ever lost power.. hell I was online playing games during the last few hurricanes..
  • Re:Software RAID (Score:3, Interesting)

    by drinkypoo ( 153816 ) <> on Tuesday July 17, 2007 @10:56AM (#19887491) Homepage Journal

    The only advantage to buying a RAID controller is that you get a lot of connectors. Otherwise, if you have any even fairly decent CPU, and you're not doing anything but shoveling data and maybe some logging, the main processor beats the living shit out of almost any CPU on any RAID controller. There are limited exceptions but those cards are highly spendy.
    And keeping a lot of data off of the interface bus. Hardware RAID controllers are all about delegation. Get the data off the bus and onto the card as fast as possible, without sending it over the bus multiple times. Which is less of a concern in the days of boards with 30+ PCIe lanes. [...] Instead of being able to tell the controller "write these X bytes of data" and only sending X bytes across the PCI bus, with Software RAID, you're probably looking at at least 2x (RAID1) up to 4x (RAID5) the bandwidth usage to write data.

    It's true that the more computation is involved, the more serious the bus bandwidth issue gets. This is an excellent reason to build software-based RAID systems with Hammer-core processors today; they have their own memory controllers onboard. Thus the RAID processing doesn't involve a bunch of bandwidth over the only bus interface on the chip.

    Also, the more cache you have, the less times the processor is actually going to go to main memory, which reduces the bus bandwidth used in RAID computations. So the ideal situation (to do this on the cheap anyway) is to use the cheapest K7-n processor you can find that has a lot of cache, and get the best of all worlds. (Plus HT links are faster in the newest processors, yes?)

Adding features does not necessarily increase functionality -- it just makes the manuals thicker.