文章目录
  1. 1. centos 开启防火墙后ftp无法访问解决方案

centos 开启防火墙后ftp无法访问解决方案

Your question isn’t phrased very well, but the symptoms you describe are
indicative of a passive FTP not working correctly in combination with
your firewall.

Typically the
command insmod nf_conntrack_ftp{style=”padding: 1px 5px; border: 0px; font-size: 13px; font-family: Consolas, Menlo, Monaco, ‘Lucida Console’, ‘Liberation Mono’, ‘DejaVu Sans Mono’, ‘Bitstream Vera Sans Mono’, ‘Courier New’, monospace, sans-serif; white-space: pre-wrap; background-color: rgb(238, 238, 238);”} is
sufficient to load the FTP helper module in a badly configured RHEL6 or
CentOS firewall.

To make that persistent:

Edit the configuration
file /etc/sysconfig/iptables-config{style=” padding: 1px 5px; border: 0px; font-size: 13px; font-family: Consolas, Menlo, Monaco, ‘Lucida Console’, ‘Liberation Mono’, ‘DejaVu Sans Mono’, ‘Bitstream Vera Sans Mono’, ‘Courier New’, monospace, sans-serif; white-space: pre-wrap; background-color: rgb(238, 238, 238);”} and
add the helper
module nf_conntrack_ftp{style=” padding: 1px 5px; border: 0px; font-size: 13px; font-family: Consolas, Menlo, Monaco, ‘Lucida Console’, ‘Liberation Mono’, ‘DejaVu Sans Mono’, ‘Bitstream Vera Sans Mono’, ‘Courier New’, monospace, sans-serif; white-space: pre-wrap; background-color: rgb(238, 238, 238);”} to
the IPTABLES_MODULES variable:

IPTABLES_MODULES="nf_conntrack_ftp"

\

or add it to any other modules already listed there.

文章目录
  1. 1. centos 开启防火墙后ftp无法访问解决方案