http://forum.ensim.com/showthread.php?t=5082
By chinkshady
For FTP issues from behind NAT or broadband connections
If you are on a broadband connection, it is likely you have NAT/non-routable IP address settings either on your internal network or from your connection provider. If you see IP ranges in the 10.x.x.x or 192.168.x.x range when you run traceroutes from your computer to an outside domain like www.yahoo.com, you are effected by this. You may also be effected if your connection is on a software or hardware firewall.
The symptoms while FTPing appear as directories not listing out, slow FTP connections, and file transfer issues.
FTP uses 2 TCP connections, 1 for control and one for data.
The standard control connection is TCP port 21. The control part that is rarely seen is TCP port 20.
When an FTP connection is made but listing a directory or sending data fails, the cause is almost ALWAYS the data connection. This is the most common problem encountered in FTP connections.
FTP also runs in 2 modes, PORT (”regular” or “normal” mode) and pasv (”passive” mode for clients behind firewalls)
In PORT mode, the FTP Client is the server end of the data connection.
In pasv mode, the server is the Web Server end of the data connection.
Looking at the FTP logs you may see the following
FTP Client> PORT 12,34,56,78,65,49
Web Server> 200 PORT command successful.
In this example of PORT mode the client has said it will be listening on IP address 12.34.56.78 on TCP port 16683 for the data channel.
The port is the 65,49 pair at the end of the string: 65×256 + 49 = 16689.
The FTP Client is the server for the data connection so if that FTP Client is behind a NAT, port 16683 MUST be allowed.
FTP Client> pasv
Web Server> 227 Entering Passive Mode (123,45,67,89,158,25)
In this example of pasv mode the server has said it will be listening on IP address 123.45.67.89 on TCP port 40474 for the data channel.
The port is the 158,25 pair at the end of the string:: 158×256 + 25 = 40473.
The Web Server needs to allow this data connection on port 40473 as well as the control port 20.
To overcome this issue, try setting up the connection as PORT connection instead of pasv. You may also have to use a different FTP Client.
FTP Clients that can do PORT mode from behind a NAT or firewalled connection or bypass non-routable IPs are:
FlashFXP
BulletProof FTP