Linux-сервер просто как RAMdisk

683
k1308517

Я хочу настроить анти-криминалистический сервер Linux для защиты моих пользователей.

Моя цель - сделать так, чтобы дистрибутив Linux и все внутри него работали из оперативной памяти, и никогда не хранили ничего постоянно.

Вполне возможно, что в конечном итоге мне потребуется сохранить выбранные объекты (например, сообщения об ошибках или отзывы пользователей) на жестком диске с полным зашифрованным диском, чтобы я мог прочитать их в случае их исчезновения. Однако все остальное не следует записывать на диск.

Я немного знаю об RAM-дисках, но я не уверен, как заставить все работать с них? Любая помощь в том, как я поступил бы, или лучшие решения будут приветствоваться.

0
Хотя одним вариантом использования такой настройки может быть защита, существуют другие варианты использования только для настройки RAM-диска. Также этот вопрос касается только того, как настроить такую ​​вещь, а не аспекта информационной безопасности. Поэтому я считаю это не по теме здесь. Кроме того, взгляните на [wikipedia: Список дистрибутивов Linux, которые запускаются из ОЗУ] (https://en.wikipedia.org/wiki/List_of_Linux_distributions_that_run_from_RAM). Steffen Ullrich 7 лет назад 0

3 ответа на вопрос

0
Lie Ryan

I'd recommend looking into device mapper. You can create a read only disk device that contains the base OS, then map a RAM disk (if you only need small writable layer) or an encrypted disk with transient key (for larger amount of writable space) as a writable overlay. Using device mapper snapshot creates a block device level overlay. Once you've setup this, you want to chroot into the partition.

For more advanced setup, you may want to do the above setup from initramfs.

Alternatively, you can also use OverlayFS/AUFS for file system level overlay.

If you need swap, you also want to make sure you encrypt your swap.

You may also want to look into TAILS OS (The Amnesiac Incognito Live System).

Вы не хотели бы использовать TAILS в качестве операционной системы производственного сервера James Kirkby 7 лет назад 0
@James Kirkby: хорошая мысль о том, что TAILS в первую очередь предназначен для настольных, а не серверных дистрибутивов. Lie Ryan 7 лет назад 0
0
symcbean

This is not a trivial thing to achieve if you know what you're doing. From the sound of things you're going to have a struggle.

Do bear in mind that you're going to have to rebuild the system from scratch if it ever powers down. Also, a Linux installation which is actually of any use is going to need a minimum of around 20Gb storage. If you use a compressed ram disk that will help a little (maybe halving the uncompressed requirement) but it still will need a lot of RAM.

OTOH you could build a normal Linux installation to hard disk then use unionfs to create a writeable layer (which can be in the form of a ram disk or encrypted partition) on top of the base installation.

0
James Kirkby

You could look into doing a PXE boot and loading it straight into ram, that sounds easiest for what you want.

This link has a tutorial for ram boot and ram pxe boot http://reboot.pro/topic/14547-linux-load-your-root-partition-to-ram-and-boot-it/

http://eduardo-lago.blogspot.com/2012/06/ram-only-pxe-boot-smallest-diskless.html

Похожие вопросы