Article ID: 1240, created on Jan 9, 2014, last review on May 11, 2014

  • Applies to:
  • Plesk 12.5 for Linux
  • Plesk 12.0 for Linux
  • Plesk 11.0 for Linux
  • Plesk 11.5 for Linux

解决方案

PassivePorts 指令用于 /etc/proftpd.conf 文件来指定被动端口范围。把该指令置入 Global container,如下所示:

<Global>
.....
.....
PassivePorts 57000 58000
</Global>

查看 ProFTPd 文档了解更多有关 PassivePorts 指令的信息:http://proftpd.org/docs/directives/linked/config_ref_PassivePorts.html.

接下来,应该在系统中加载 ip_conntrack_ftp 模块:

# /sbin/modprobe ip_conntrack_ftp
# lsmod | grep conntrack_ftp
nf_conntrack_ftp       13696  0
nf_conntrack           61684  1 nf_conntrack_ftp

同时,应通过以下方式配置 iptables

iptables -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT

如果服务器有 NAT,则还需加载 ip_nat_ftp 模块:

# /sbin/modprobe ip_nat_ftp

要想在系统启动后保留修改,请把该模块添加至 /etc/sysconfig/iptables-configIPTABLES_MODULES 行(空格隔开)。

a914db3fdc7a53ddcfd1b2db8f5a1b9c 29d1e90fd304f01e6420fbe60f66f838 56797cefb1efc9130f7c48a7d1db0f0c aea4cd7bfd353ad7a1341a257ad4724a 0a53c5a9ca65a74d37ef5c5eaeb55d7f 01bc4c8cf5b7f01f815a7ada004154a2 2a5151f57629129e26ff206d171fbb5f e335d9adf7edffca6a8af8039031a4c7 742559b1631652fadd74764ae8be475e

Email subscription for changes to this article