Building a Fully Encrypted NAS On OpenBSD
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."
mistermark's failed hard drive only further confirms that BSD is, in fact, dying.
WTF
IsA
NAS
?
Wow, that was a pretty in-depth how-to. It even has a mechanism (via cron) to notify you within 15 minutes if a drive fails. This sounds like a pretty interesting solution. I think I may have to give it a try with a spare box I have laying around. Thanks mistermark. I'm impressed.
One step in the long process. Kudo's and gratitude for putting this up, it will certainly make my process easier.
I wonder, are there any full HOWTO's on this? 802.1x and IPSec both come to mind. The protection is useless if the server is powered on of course.
Me failed English...
FreeBSD over Linux. If my comments seem odd, this may explain...
Yes but... does it run on Linux?
Although, since the OS is just there to boot and allow access to data, I was thinking of using a 1GB CF card to put the OS on. I like the RAID 1 setup the instructions are easy to follow, but how about other RAIDs?
Kdawson clearly killed the other editors, and is now posting all stories. If you see anyone else posting, it's actually kdawson using their account. Look for more dupes, April Fool's Day jokes, and Slashvertisements soon.
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.
Any idea if OpenBSD supports Sun's ZFS filesystem?
-metric
but can it do 2 gzips at the same time!?
Censorship is obscene. Patriotism is bigotry. Faith is a vice. Slashdot 2.0 sucks.
I can't believe that after developing such a nifty system, the author suggests it can be expanded with USB drives.
USB was o.k. last year, but with 20GB/sec effective transfer rate at most, it simply doesn't do a large modern HDD justice anymore. For me, the only justification for USB is convenience and everything small enough that it can be self-powered by USB, like some 2.5" HDDs.
Anyways, I would caution anyone from crippling their crypto box transfer rates with USB.
I've been doing encrypted Raid5 machines for years. XFS, on top of Loop-AES, on top of software Raid5 is the bomb. Add nfs-kernel-server and samba and you have a full service network server. It's pretty easy with Ubuntu, and now Feisty (with kernel 2.6.20) supports hot plug eSata, for fast backup to portable eSata disk drives. ZFS with encryption might conceivably replace the XFS/Loop-AES/Raid5 recipe someday, but at the current rate of progress, it looks to me like its a year away at least. If Seagate gets their act together, and starts shipping 1TB drives with hardware AES support, we might see a big jump in disk throughput. In any event, I use a headless file server with a frozen version of Dapper for the fileserver, and then run Feisty on a diskless machine that boots off the file server. If I need Windows, I just use VirtualBox on the diskless Feisty machine. And of course, it's all backed up offsite every night with rsync. Rsync is indeed our friend. So why would I need BSD again?
1. download FreeNAS
2. install to USB/CF drive (it needs ~32Mb)
3. configure * reboot on the USB/CF drive (or if your mobo cant boot to those, maybe a CD or spare HD)
4. ?
5. Profit!
Tm
Support TBI Research: http://www.raisinhope.org
Well, it's already done. It's called FreeNas. Typical OSS advocate. Re-inventing the wheel... yet again.
I don't respond to AC's.
**BITE**
Netcraft should know since they run fbsd themselves
You have pasted this troll before, have you not?
Could you write up/point me to a howto for this? I'm interested in setting up a similar system but would prefer sticking to ubuntu rather than moving to bsd.
2)He's an editor
3)???
4)PROFIT!!!
Or something like that.
You can install Debian Etch and let the installer do it for you.
Seeing as that he uses per-volume encryption, this is pretty useless. It makes his 'server' pretty much a single-user NAS box, because as soon as another user gets an account to access the file server, they get access to the data.
Data encryption on a fileserver only makes sense if it is done on a per-user level. This is not News for Nerds, as this is basically just another implementation of how to encrypt your local disk.
Mart"I know I will be modded down for this": where's the option '-1, Asking for it'?
I mean seriously, the guy just now realized he should fsck his encrypted volume.... I would trust his howto as far as I could throw it. Why the hell did this make the slashdot frontpage? *sighs*
Use dm-crypt with LUKS in the aes-cbc-essiv:sha256 mode (should be the default). There are policy issues and known plaintext attacks against loop-AES unless you the multi-key setup which _isn't_ the default... by the times the issues were widely known people were using LUKS because key management is more flexible.
THIS THING CAN TURN ON A DIME, MACROSSZERO STYLE ALSO FUCK BETA, ~NYORON
I am still looking forward to windows home server. I know, I know its not open source and is from what many people here consider to be the evil empire. But, it does do things that I have not seen anyone in open source doing (the seemless backing up across as many external drives as you want for instance). Hopefully in the coming years some open source projects will get started to do what Home server will be doing.
A fine alternative is UnRaid (just Google it). Boots from a USB stick. It is basically RAID w/o striping, with 1 parity drive for up to 13 data drives. Lose 1 drive and it will rebuild and recover using parity. And if you have a catastrophic failure, instead of losing all data like RAID, you only lose the data on the failed drives and the others are fine.
And your drives can be different sizes, so you can add capacity in any amount (i.e. whats on sale).
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
_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_
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
Comment removed based on user account deletion
Since LUKS supports PKCS-5 style iterative hashing of the passphrase, it's a good idea to use that too. A million iterations only take a few seconds (10 on my 1.5Ghz Athlon) to compute at mount time, but make dictionary attacks a million times harder.
Forcing people to encrypt the data before copying it off the machine doesn't do anything. They can still go ahead and decrypt it on their laptop and leave it like that since its more convenient. You can't solve social problems with technical solutions. The sooner you learn that the sooner you stop making people's lives difficult for no reason.
Comment removed based on user account deletion
What! You are saying that Ubuntu doesn't do this on install? Even the Debian Installer has support for these kind of setups.
raid5 in software is a cpu killer, but I'll leave that to you.
The data encrypts you!
hold you hand out... if it shakes, you have NAS
The Bible: Historically verifiable fact from an observers point of view
OpenBSD on a fileserver? Firewall, sure. Fileserver w/RAID and disk encryption, no way. I would leave that task to FreeBSD (FreeNAS) or Linux (CryptoBox, Openfiler). If you are desperate for encrypted FS + RAID you can use MD + LUKS (Linux) or GRAID5 + GELI (FreeBSD) those are all available via FreeNAS, CryptoBox, and Openfiles. Suffice to say both have proven their stability, have a rich set of features (e.g. LRW), and are simple to set-up. The end-user NAS solutions are pretty sophisticated and have good web interfaces.
20 MB/sec is quite a shit performance IMO however if you don't use gigabit it'd be good enough. With GELI there is about 55% overhead compared to plain text. I haven't compared LUKS to plain text hence can't compare. On a side note, I doubt its useful to encrypt data you're receiving from distributed areas, nor that its useful to put such data in a RAID. A NAS doesn't run BitTorrent. If you're paranoid whereas you share your data over SMB, that might be the weakest point.
For our ricer folk, a nice, expensive RAID controller is necessary. For the smart people among this planet: do software XOR by getting an EE (or SFF) dual core AMD which are cheap and have a a low 10 idle W and have a low TDP (the SFF has 35W TDP). Get 4 Samsung SpinPoint T166 SATA (silent, low power, best bang for buck) and you have 1,5 TB RAID. All in all this costs about 650 EUR (probably less in USA) w/all hardware new including case, 2 * 1 GB RAM (2 * 0,5 GB would suffice too), and PSU. I should know, I bought and build such machine.
Forget ZFS for now. OpenSolaris has bad hardware support, and it is only partly ported on FreeBSD 7.0-CURRENT where it isn't stable and a bug in it takes the whole system down. While it does have a rich set of features, it also doesn't support encryption yet, although the feature has been planned for a year and perhaps on FreeBSD it can be used together with GELI. Performance of ZFS is also not to write home about compared to GRAID5. ZFS isn't mature yet. Nor is FreeBSD 7.0-CURRENT, ofcourse. It'll be part of FreeBSD 7.0 however, as an experimental feature.
WE DON'T NEED NO BLOG CONTROL.
Why that got modded as troll I dunno.
So he made a few mistakes which you consider stupid. TBH, as soon as anyone says "NAS" without considering RAID and backups, I think they're on a path to pain.
/. article.
But at the end of the day, no matter how many things you think about, no matter how much effort you go to, there is always something that gets missed. AFAICT, he's only got one power supply and no UPS on there, and on any large filesystem I'd consider journalling (or Soft Updates on OpenBSD) a must these days.
You can build a system in which nothing is missed, and it always works no matter what happens. But then you're talking realtime mirroring across at least two sites, gigabit links between the sites and regular DR tests to make sure everything works as intended. A little more sophisticated than your average
Network Attached Storage, Neural Attentuation Syndrome, Network Access Server...
People need to stop using this and find more unique alternatives. Along with "MAC".
Wow I didn't know the Commander In Chief posted on slashdot! :D
I will never claim to be perfect, but when a howto makes the _frontpage of slashdot_ I assume the person who wrote it knows what he is talking about.
Judging by his mistake with the fsck he forgot the last time I sure as hell hope people don't just blindly follow his directions this time. God knows what he might have missed this time around.
Had it not made the frontpage and/or had been buried in askslashdot I couldn't have cared less.
Yes, openbsd can be a fileserver. Why is it shocking that a general purpose unix OS can be used for general server tasks? There's no need to use an insecure OS for your servers and only use openbsd as a firewall.
You won't be decrypting it without a key.
If you do in fact have the key on your laptop, then you must have been authorized to carry the data around without encryption. That would be unusual.
The idea is that you can put an encrypted blob onto your insecure laptop, take this to a different secure machine which has the key, and then get access to the content on that secure machine. The laptop (or DVD-R, or CompactFlash) can't decrypt since it lacks the key.
...does its milkshake bring all the boys to the yard?
Software RAID... sorry, but never use it. 3Ware SATA RAID cards are cheap enough that the cost savings just isn't worth it. I consider my data to be worth the extra couple hundred bucks rather than monkey around with SW RAID that is a real pain to rebuild. For the REALLY important stuff, I use an Adaptec 3400 RAID card with 10 SCSI drives, and sustain 86 MB/s over a RAID-5. You can get this stuff off eBay cheaply enough that cash isn't a real issue at all.
Call me when this runs on my 266MHz ARM box, aka the Linksys NSLU2. My current setup is Debian Etch installed to a flash drive, and 2 250GB disks in RAID-1 w/ LVM hung off the USB ports. Near silent, and sucks about 10W of power.
I want to delete my account but Slashdot doesn't allow it.
When users leave, their keys and passphrases should be deactivated so they can't use them later to gain unauthorized access. This is nontrivial because it implies that every file they've ever had the key for need to be re-encrypted with a new random key, which is a lot of processing. Practically speaking, it's better to assume that anyone who has access to the data has actually copied every available bit of plaintext and key material and plan the threat model and security around that assumption. In light of that, it may actually make sense to encrypt on both the client and the server. The server is assumed to have a key that no user knows, and the users have keys that the server doesn't know. Only collusion between a server administrator and a user would be sufficient to retrieve all the encryption keys necessary to do bulk decryption of stolen media, and only for the keys the user knows.
Key escrow is for users who forget their passwords. It also prevents the loss of data due to the loss of individuals (through firing, quiting, or death). Secret sharing can be used to ensure that n or more administrators are required to recover a key, for some n>0
I looked at a FreeBSD NAS project (don't remember the name though- I've slept since then. FreeNAS?) that looked really neat. Booted from USB key so only data was on the drives. I was impressed what with I ready until I hit the part in the docs where it didn't work with Silicon Image 311x SATA chipsets. The most common fudging chipsets out there. Linux has no problems with that chipset but the FreeBSD has major ones?
That totally harshed my buzz on the thought of the project and put FreeBSD on the "still not ready for prime time" list for me. I'm hoping they will someday get that compatibility working some year because the project looks very promising.
I will never claim to be perfect, but when a howto makes the _frontpage of slashdot_ I assume the person who wrote it knows what he is talking about.
You must be new here.
Give me Classic Slashdot or give me death!
Naturally with an encrypted disk your going to have slower throughput. I've been considering setting up some sort delayed encryption scheme where you have a 10-20GiB area of unencrypted space, when something gets written to this portion it will be encrypted at a later time. I'm thinking it may be possible with unionfs/aufs or maybe with a custom script or FUSE filesystem.
Anyway, if your situation will permit data not be encrypted immediately, this would be a good compromise between speed and security....
Icemaann
http://www.nugg.org
Kind of deal killer.
You are using subjective judgments there. You have no way to know if the guy with the keys for the "safe" datacentre may be bribed to pull your disk and make a runner.
Encrypting cost you little and contributes to your peace of mind, it does not solve all problems, but at least addresses the one where a thief with light feet is involved....
IANAL but write like a drunk one.