Home > CentOS, Sys Admin > Issues with FTP on CentOS 5.4

Issues with FTP on CentOS 5.4

If you’re getting “data connection refused errors” when trying to ftp onto a CentOS box, make sure your ip_conntrack_ftp is loaded.
The default RH/CentOS iptables script includes a conntrack statement :

-A RH-Firewall-1-INPUT -m state –state ESTABLISHED,RELATED -j ACCEPT

but does not load the ftp module.
to fix on the fly run :

modprove ip_conntrack_ftp

to make sure it happens again on boot modify your /etc/sysconfig/iptables-config modules list :

IPTABLES_MODULES=”ip_conntrack_netbios_ns ip_conntrack_ftp”

  1. tonyc
    April 13th, 2010 at 07:08 | #1

    I’m having this problem but when I try to issue the command ‘modprobe ip_conntrack_ftp’ I get a fatal warning that the module does not exist in /lib/modules/2.6.18-028stab068.9/modules.dep: No such file or directory.

    Any idea what this is?

    Also, I can not find the file /etc/sysconfig/iptables to edit the rules? I only have /etc/sysconfig/iptables-config?

    All of the tutorials I have read say to edit the iptables script which I would do if only I could find it!

    Cheers for the tutorial – I would go crazy without them!

  2. April 13th, 2010 at 11:00 | #2

    Tony, can you send me the output of the following 3 commands ?

    uname -a
    cat /etc/redhat-release
    rpm -qa | grep iptables

  1. No trackbacks yet.