用于交换的 dm-crypt 在服务器上没用吗?
我想弄清楚为什么你想要加密 Linux 操作系统上的 /swap 分区?如果我理解正确的话,dm-crypt 在安装磁盘或分区时提供数据加密/保护。 (除非我完全错过了 dm-crypt 的要点,并且一旦您安装了分区并实际在操作系统内运行,它似乎不会执行任何类型的加密或数据保护)。
那么,为什么您愿意加密服务器上的 /swap 分区呢?我可以看到这对于进入待机/休眠状态的笔记本电脑或台式机来说是有意义的,但对于“打开”或“关闭”的服务器,启动时 /swap 中永远不会有任何数据。
I'm trying to figure out why you would want to encrypt the /swap partition on a Linux OS? If I understand it correctly, dm-crypt provides data encryption/protection when a disk or partition is being mounted. (Unless I completely missed the point of dm-crypt, and it appears that it does not do any kind of encryption or data protection once you've mounted the partition and are actually running inside the OS).
Why, then, would you care to encrypt your /swap partition on a server? I could see this making sense on a laptop or desktop that goes into standby/hibernate, but for a server that is either "on" or "off" you will never have any data in /swap when you're booting.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
它可以防止有人拔掉您服务器的插头、砸碎机箱并读取磁盘。
It defends against someone who pulls the plug on your server, smashes the case, and reads the disk.
/swap 是一个与磁盘上任何其他分区一样的分区。写入其中的数据在启动和断电期间都会保留(除非它是 RAM 磁盘,即使如此也取决于情况)。
如果信息位于加密分区上,然后加载到内存中(这通常意味着它也被解密),然后从内存中换出(现在位于 /swap 分区上),则可以从 /swap 分区读取解密的信息直到磁盘的该扇区被覆盖为止的任何点。
/swap is a partition like any other on your disk. Data written to it is preserved across boots and power downs (unless it's a RAM disk, and even then it depends).
If information is on an encrypted partition, then loaded into memory (which typically means it was also decrypted), then swapped out of memory (now it's on the /swap partition), then that decrypted information could be read from the /swap partition at any point up until that sector of the disk gets overwritten.