If you are able to connect to an FTP server but are unable to get a directory listing or successfully issue any other commands then you are probably being blocked by a firewall. To fix this you need to use FTP’s passive mode, simply type “passive” after logging in to an FTP server.

ftp> passive
Passive mode on.

FTP has two modes of operation, active mode and passive mode. Active mode is usually the default setting in clients and this opens two channels of communication (ports) between the client and the server – one channel for FTP commands and one for data transfer. Active mode is useful in that you can asynchronously send commands and data. Passive mode opens a single channel between client and server and sends all commands and data synchronously on the one channel.

Many firewalls only open one port for FTP and so Active mode will not work. FileZilla, the popular Windows FTP client, uses passive mode by default.