/etc/hosts.allow
#
# hosts.allow This file describes the names of the hosts which are
# allowed to use the local INET services,as decided
# by the ‘/usr/sbin/tcpd’ server.
#
vsftpd: 123.103.47.0/255.255.255.0 218.240.63.0/255.255.255.0 59.46.172.0/255.255.255.0 10.0.0.0/255.0.0.0 60.2.80.0/255.255.255.0 218.249.230.0/255.255.255.0 160.10.0.0/255.255.0.0 218.246.69.0/255.255.255.0 125.35.3.0/255.255.255.0 : allow
/etc/hosts.deny
#
# hosts.deny This file describes the names of the hosts which are
# *not* allowed to use the local INET services,as decided
# by the ‘/usr/sbin/tcpd’ server.
#
# The portmap line is redundant,but it is left to remind you that
# the new secure portmap uses hosts.deny and hosts.allow. In particular
# you should know that NFS uses portmap!
vsftpd : ALL : DENY
将tcp_wrappers=yes添加至/etc/vsftpd/vsftpd.conf 中
$ vi /etc/vsftpd/vsftpd.conf
tcp_wrappers=YES
重新启动VSftpd
$ service vsftpd restart
Shutting down vsftpd: OK ]
Starting vsftpd for vsftpd: OK ]
故障排除
如果配置中出现问题,请从以下几方面检查
- 文件权限和文件属主问题
- 防火墙iptables没开放相关的端口
- SELinux导致的权限问题,建议先关闭SELinux再配置VSftp,之后再开启到permissive模式.或者运行这条命令:
setsebool -P ftp_home_dir=1 .
参考文档
http://www.google.com
http://www.ha97.com/4113.html
http://www.cnblogs.com/sztsian/archive/2011/08/23/2204102.html
文:Mike
文章出处:运维之美(微信公众号ID:Hi-Linux) (编辑:淮安站长网)
【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!
|