vsFTPd的服务器和防火墙及SELINUX的关系暧昧


我在论坛上看到有些弟兄说vsFTPd服务器启动正常,但却不能访问或用户不能上传文件,我感觉应该是防火墙或SELINUX的事;可能FTPD服 务器被防火墙或SELINUX的安全机制防住了。所以您必须要让防火墙通过ftp,当然也要让SELINUX通过ftp服务器才行;

在Fedora/Redhat/CentOS中,您要设置一下防火墙,可以把防火墙关掉,或者在自定义中让ftp “通过”防火墙;

[root@localhost ~]# system-config-securitylevel-tui

或者运行一下如下的命令,清除防火墙规则(通用);

[root@localhost beinan]# iptables -F

关于SELINUX服务器的解说 ,可能老手或新手对SELINUX都有点麻烦,建议您SELINUX;或者让vsFTPd服务器跳过SELINUX启动;也就是说要用到 4.1、vsFTPd服务器启动和关闭的通用方法;;这在Fedora/Redhat/CentOS中这样启动vsFTPd服务器是有效的;

当然您可也可以关掉SELINUX,在/etc/selinux/config 配置文件如下;

/etc/selinux/config

# This file controls the state of SELinux on the system.

# SELINUX= can take one of these three values:

# enforcing - SELinux security policy is enforced.

# permissive - SELinux prints warnings instead of enforcing.

# disabled - SELinux is fully disabled.

SELINUX=Disabled #这样就把SELINUX服务器关掉了,请重新启动系统;

# SELINUXTYPE= type of policy in use. Possible values are:

# targeted - Only targeted network daemons are protected.

# strict - Full SELinux protection.

SELINUXTYPE=targeted

通过文章看来vsFTPd的服务器和防火墙及SELINUX的关系不咋地,但是通过上面的办法能更好的处理好他们的关系!

相关内容