火墙的设定和磁盘加密

###将ftp加入防火墙白名单####

[[email protected] ~]# firewall-cmd --list-all  ##防火墙开着时可使用的命令

public (default, active)

interfaces: eth0

sources:

services: dhcpv6-client ssh

ports:

masquerade: no

forward-ports:

icmp-blocks:

rich rules:

[[email protected] ~]# firewall-cmd --permanent --add-service=ftp  ##添加ftp服务

success

[[email protected] ~]# firewall-cmd --reload    ##更新

success

[[email protected] ~]# firewall-cmd --list-all    ##重新查看可使用的列表

public (default, active)

interfaces: eth0

sources:

services: dhcpv6-client ftp ssh

ports:

masquerade: no

forward-ports:

icmp-blocks:

rich rules:

###加密###

[[email protected] Desktop]# fdisk /dev/vdb   ##划分设备

[[email protected] Desktop]# cryptsetup luksFormat /dev/vdb1  ##给原始文件系统加密

WARNING!

========

This will overwrite data on /dev/vdb1 irrevocably.

Are you sure? (Type uppercase yes): YES  ##是否确认加密(大写)

Enter passphrase:

Verify passphrase:

[[email protected] Desktop]# cryptsetup open /dev/vdb1 westos   ##打开加密设备并命名为westos

Enter passphrase for /dev/vdb1:

[[email protected] Desktop]# ll /dev/mapper/westos

lrwxrwxrwx. 1 root root 7 Apr 22 21:20 /dev/mapper/westos -> ../dm-0

[[email protected] Desktop]# mkfs.xfs /dev/mapper/westos

meta-data=/dev/mapper/westos     isize=256    agcount=4, agsize=65408 blks

=                       sectsz=512   attr=2, projid32bit=1

=                       crc=0

data     =                       bsize=4096   blocks=261632, imaxpct=25

=                       sunit=0      swidth=0 blks

naming   =version 2              bsize=4096   ascii-ci=0 ftype=0

log      =internal log           bsize=4096   blocks=853, version=2

=                       sectsz=512   sunit=0 blks, lazy-count=1

realtime =none                   extsz=4096   blocks=0, rtextents=0

[[email protected] Desktop]# mount /dev/mapper/westos /mnt/

[[email protected] Desktop]# cd /mnt

[[email protected] mnt]# ls

[[email protected] mnt]# touch file{1..3}

[[email protected] mnt]# ls

file1  file2  file3

[[email protected] mnt]# df

Filesystem         1K-blocks    Used Available Use% Mounted on

/dev/vda1           10473900 3805196   6668704  37% /

devtmpfs              927072       0    927072   0% /dev

tmpfs                 942660     140    942520   1% /dev/shm

tmpfs                 942660   17004    925656   2% /run

tmpfs                 942660       0    942660   0% /sys/fs/cgroup

/dev/mapper/westos   1043116   32928   1010188   4% /mnt

[[email protected] mnt]# umount /mnt/

umount: /mnt: target is busy.   ##原因,未退出当前位置

(In some cases useful info about processes that use

the device is found by lsof(8) or fuser(1))

[[email protected] mnt]# cd

[[email protected] ~]# umount /mnt/

[[email protected] ~]# mount /dev/mapper/westos  /mnt

[[email protected] ~]# umount /mnt/

[[email protected] ~]# ll /dev/mapper/

total 0

crw-------. 1 root root 10, 236 Apr 22 21:01 control

lrwxrwxrwx. 1 root root       7 Apr 22 21:20 westos -> ../dm-0

[[email protected] ~]# cryptsetup close westos

[[email protected] ~]# ll /dev/mapper/

total 0

crw-------. 1 root root 10, 236 Apr 22 21:01 control

[[email protected] ~]# mount /dev/vdb1 /mnt/

mount: unknown filesystem type ‘crypto_LUKS‘

[[email protected] ~]# cryptsetup open /dev/vdb1 westos

Enter passphrase for /dev/vdb1:

[[email protected] ~]# mount /dev/mapper/westos /mnt/   ##与上步对比

[[email protected] ~]# cd /mnt

[[email protected] mnt]# ls

file1  file2  file3

[[email protected] mnt]# cd

时间: 2024-08-24 21:03:07

火墙的设定和磁盘加密的相关文章

怎么用Mac给NTFS磁盘加密

在日常生活中,很多的人都会使用U盘或移动硬盘来储存一些资料,但是有些资料我们是不想让别人看到的,这个时候就需要给这些资料加密了,那么如何用用Mac给NTFS磁盘加密呢?下面我们就针对这个问题给大家介绍介绍. 步骤: 1.准备好NTFS磁盘,到NTFS For Mac中文官网,下载软件,因为我们的Mac系统对NTFS格式的磁盘只能读,安装之后我们就可以对NTFS磁盘进行任何修改了,下载链接:http://www.ntfsformac.cn/ 图一:安装导视图 2.在Mac系统里面打开”磁盘工具”,

linux初学者-磁盘加密篇

linux初学者-磁盘加密篇 因为保密需要,一般系统中会在文件和磁盘中进行加密,但是文件的加密比较容易破解,不安全.所以在特殊需要下,会对磁盘进行加密,磁盘加密后在磁盘损坏的同时,其中的数据也会损坏,接下来将会介绍磁盘加密的一些内容. 新建立一个磁盘分区,输入"cryptsetup luksFormat /dev/vdb1"对磁盘分区/dev/vdb1进行加密,输入大写的"YES"后,输入两次密码,即可完成磁盘加密. 完成加密后如何挂载呢?如下图所示,如果将vdb1

linux中设备配额 磁盘加密

1.设备的配额Linux根分区的磁盘空间耗尽时,Linux将无法再创建新的文件(包括程序运行的临时文件),从而导致服务程序崩溃,系统无法启动等故障现象. 为了避免出现类似问题,可以设置启用磁盘配额功能,对用户在指定文件系统(分区)中使用磁盘空间.文件数量进行限制,以防止个别用户恶意或无意间占用大量磁盘空间,从而保证系统存储空间的稳定性和持续可用性 设置磁盘配额,需要安装 quota 软件包,用于配置和管理磁盘配额,在RHEL 6中,系统默认安装了 quota 软件包. 这里先分了两块sdc1和s

RHCE系列之磁盘加密----LUKS加密

LUKS (Linux Unified Key Setup)为 Linux 硬盘加密提供了一种标准,它不仅能通用于不同的 Linux 发行版本,还支持多用户/口令,并且由于它的加密密钥独立于口令,所以即使口令失密,我们也无需重新加密整个硬盘,只需要及时的改变口令即可重获安全! 由于 LUKS 提供了一个标准的磁盘加密格式,使得它不仅兼容性高,而且还提供了多用户密码管理的安全机制. 在我们的操作系统中,负责对磁盘做加密的工具为 Cryptsetup ,默认我们的系统已经安装了该工具. 由于 Cry

linux 磁盘加密保护

一:制作加密磁盘分区 1:分区 [[email protected] ~]# fdisk /dev/vdb Welcome to fdisk (util-linux 2.23.2). Changes will remain in memory only, until you decide to write them. Be careful before using the write command. Command (m for help): n Partition type:    p   

linux分区及磁盘加密

为什么要磁盘加密呢?那是因为每个人都有自己的隐私!当你将你的隐私放到某一个磁盘中并且不想让别人看到,那么你就可以给这个磁盘加密.下来我给大家演示具体的加密步骤. 第一:先在系统中分出一个你想将隐私放在里面的一个区 第二:分好区后要将分好的区格式 mkfs.xfs /dev/vdb1(将/dev/vdb1格式化成xfs格式.当然也可以格式化成vfat,ext4/2格式) 第三:cryptsetup luksFormat /dev/vdb1(格式化加密层.会提示输入密码.注释:密码必须大于八位且是无

Windows身份验证可绕行小瑕疵 将令BitLocker磁盘加密大败北

使用BitLocker并加入域的Windows计算机应尽快打补丁 作者:卢西恩·康斯坦丁(Lucian Constantin)2015-11-14 翻译:PurpleEndurer !伊恩·哈肯(Ian Haken)在阿姆斯特丹举行的黑帽欧洲安全会议上,2015年11月13日,卢西恩康斯坦丁(Lucian Constantin) 依托微软BitLocker加密员工计算机硬盘的公司应该立即安装最新的Windows补丁.一位研究员透露一个简单的Windows身份验证绕行方法,这让BitLocker加

android全磁盘加密

android 全磁盘加密 什么是全磁盘加密? 全磁盘加密是使用一个密钥来为android设备上所有的用户数据加密的过程.一旦设备被加密,所有的用户创建的数据都将会在提交的磁盘之前自动加密,在读取之前都会自动解密. Android 5.0中添加了啥 创建了快速加密,该加密方式仅仅加密在数据分区中使用块设备的数据来避免第一次启动耗费较长时间.仅仅ext4和f2fs文件系统支持快速加密. 在首次启动的时候添加forceencrypt标志来加密 增加了对模式的支持和没有密码的加密 增加使用可信执行环境

Linux下磁盘加密

Linux下磁盘加密 LUKS(Linux Unified Key Setup)为Linux硬盘加密提供了一种标准,它不仅能通用于不同的Linux发行版本,还支持多用户/口令.因为它的加密密钥独立于口令,所以如果口令失密,我们可以迅速改变口令而无需重新加密真个硬盘.通过提供一个标准的磁盘上的格式,它不仅方便之间分布的兼容性,而且还提供了多个用户密码的安全管理.必须首先对加密的卷进行解密,才能挂载其中的文件系统. 工具:cryptsetup(默认已经安装) 常用参数:luksFormat.luks