禁止某些IP段的主机匿名访问vsftpd服务器

一 配置vsftpd.conf文件

tcp_wrappers=YES
配置完后,执行下列命令重启vsftpd服务器

[root@localhost vsftpd]# systemctl restart vsftpd.service

 
二 编辑/etc/hosts.allow文件,增加一行命令
vsftpd:192.168.0.0/255.255.255.0:DENY
 
三 测试

 
 

猜你喜欢

转载自cakin24.iteye.com/blog/2341366