Vsftpd的安全配置案例分析

案例一
 
配置ftp服务器,要求如下,
 
1.匿名用户只能下载,匿名用户的根目录为/var/abc/,要求用户在该虚拟机上新增虚拟磁盘(30G),对磁盘进行分区,新增磁盘的第一个分区(10G)格式化为EXT3文件系统,将该分区挂载在/part1目录下,在/part1上创建home目录,将linux主机上本地帐号的默认家目录改为/part1/home,在该系统中创建user1和user2帐号,user3以及user4在进行ftp访问时,可以访问到自己的家目录,每个用户的空间限制为8M,速率为3MB/S,要求该ftp服务器同时的在线访问量为80个连接,每用户的连接数最多为3个,禁止user5登录。
 
案例二。使用tcp_wrapper,作ip限制。利用CA 实现安全ftp的安全访问
 
一.配置如下:
 
修改用户家目录
 
[root@root ~]# useradd -D -b /part1/home

Vsftpd的安全配置案例分析


 
先要做磁盘配额
 
[root@mail ~]# fdisk /dev/sdb
 
The number of cylinders for this disk is set to 3916.
 
There is nothing wrong with that, but this is larger than 1024,
 
and could in certain setups cause problems with:
 
1) software that runs at boot time (e.g., old versions of LILO)
 
2) booting and partitioning software from other OSs
 
  (e.g., DOS FDISK, OS/2 FDISK)
 
Command (m for help): n
 
Command action
 
  e  extended
 
  p  primary partition (1-4)
 

 
Partition number (1-4): 1
 
Last cylinder or +size or +sizeM or +sizeK (1218-3916, default 3916): +10G
 
Command (m for help): w
 
二.格式化硬盘命令:
 
Mkfs -t  ext3 /dev/sdb1
 
创建目录,并挂载硬盘
 
三.编辑配置文件如下:
 [root@mail ~]# vim /etc/fstab     
 
[root@mail ~]# mount /dev/sdb1 /part1/home
 


[root@mail ~]# mount -o remount /dev/sdb1
 
[root@mail ~]# mount
 
/dev/sdb1 on /part1/home type ext3 (rw,usrquota)
 
usrquota这个磁盘配额参数也已经添加成功了
 
[root@mail ~]# df -h
 
文件系统              容量  已用 可用 已用% 挂载点
 
/dev/mapper/VolGroup00-LogVol00
 
                      13G  2.2G  9.8G  18% /
 
/dev/sda1              99M  12M  82M  13% /boot
 
tmpfs                125M    0  125M  0% /dev/shm
 
/dev/sdb1            9.2G  150M  8.6G  2% /part1/home

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:http://www.heiqu.com/5c37cf59400faea0b881f5593c5cffb7.html