FTP not working

winger

Verified User
Joined
Oct 5, 2004
Messages
176
Location
Rio de Janeiro - Brasil
hi,

I can not login in any ftp account:

Command: PASV
Response: 227 Entering Passive Mode (xxx,xx,xx,xx,139,52).
Command: LIST
Error: Transfer channel can't be opened

it is the ProFTPd 1.3.1

any help?

thanks!
 
The problem is probably with your firewall not automatically opening ports for FTP as required.

Jeff
 
That's the problem; ftp in PASV mode can use any even up to all (in extreme cases when 64,000 connections are in use at once) non-privileged ports. Opening all possible ports would make a firewall useless.

The following explanation is specific to Linux because I'm not familiar with FreeBSD; perhaps someone else can add to the thread so it covers information for FreeBSD as well.

Both the KISS and APF+BFD firewalls for Linux support FTP connection tracking and automatically open and close ports through the firewall for passive FTP as required.

But if your kernel doesn't support the ip_conntrack_ftp module, then you have to open ports manually for passive FTP, or else disallow it.

To open ports for passive FTP, you need to first select a range of unprivileged ports, then open them in your firewall, and then tell ProFTPd to limit passive ftp to those ports.

For reference you may want to look at Active FTP vs. Passive FTP, a Definitive Explanation, at Active FTP vs. Passive FTP, Appendix 1, and at [URL="http://www.kalamazoolinux.org/presentations/20010417/conntrack.html]Connection Tracking[/URL] (for the latter scroll down to Connection tracking and ftp).

Jeff
 
Jeff,

thank you! your answer fix my problens.

I've set the passive ports at apf and proftp in the software based firewall server (it is working now) and we will not offer passive transfer in the server that is protect by a hardware firewall.

regards,
Ricardo.
 
Not offering passive ftp transfer in servers protected by a hardware firewall may be your only option if you're not willing to open a port range on the hardware firewall, but it may end up being a customer support nightmare.

Jeff
 
Back
Top