Take the 2-minute tour ×

I'v allowed FTP ports 21 and 20 which then allows me to connect to my FTP server via "ftp" command, but I still can't get curlftpfs to work.

What ports does curlftpfs all use? Or is their something else I have to do with iptables to allow curlftpfs?

curlftpfs -v /ftp1/ -o user=user:pass

I get this in the log when I try to do "ls -l" in /ftp1/ http://drp.ly/13573T

I uploaded the log to that site since it would look very messy here

I use these rules to allow FTP:

iptables -A INPUT -p tcp --sport 21 -j ACCEPT
iptables -A INPUT -p tcp --sport 20 -j ACCEPT
share|improve this question

2 Answers 2

up vote 2 down vote accepted

It looks like curlftpfs is using pasv mode. You need to either force active mode, or modprobe ip_conntrack_ftp to allow pasv connections through.

share|improve this answer
How would I force active mode with curlftpfs? (I looked though the man page but they don't say) Also how would doing 'modprobe ip_conntrack_ftp' help? It's a firewall issue I though... since when I allow everything though the firewall it works. –  Mint May 21 '10 at 23:48
BTW I ran 'modprobe ip_conntrack_ftp' but it doesn't change anything –  Mint May 21 '10 at 23:49
@Mint: From the man page (digipedia.pl/man/doc/view/curlftpfs.1) use the -o ftp_port=$server_address option. also one of the two modprobe's (mine and Warner's) should have worked what distro are you on? –  Zypher May 21 '10 at 23:54
Im using Debian Lenny –  Mint May 21 '10 at 23:56
huh, weird, i don't have a debian system, but works fine on my ubuntu boxes. Check your IPTABLES rules against the ones here: cyberciti.biz/faq/iptables-passive-ftp-is-not-working –  Zypher May 22 '10 at 0:02

The ip_nat_ftp kernel module needs to be loaded if support is not compiled into the kernel.


/sbin/modprobe ip_nat_ftp

share|improve this answer
No that didn't fix it, I put a log of the firewall while I tried to connect –  Mint May 21 '10 at 23:00

Your Answer


