Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

i have a remote server running linux/WHM/cpanel which i'm having no trouble connecting to via SSH (via the same internet connection).

however, when i try to connect with FTP, sometimes it works, and sometimes it gives me the following message:

Server said: I won't open a connection to (only to 

Error -162: PORT failed

sometimes it just works, and sometimes it doesn't!

the IP is the one i see when i check my ip using on my local computer.

in addition to this, if i use a different internet connection it works fine.

my ISP doesn't seem to know what's going on.

please help!

thanks :)

share|improve this question

PORT mode requires the server to make connections to the client, which typically doesn't work in NATed or firewalled environments. In almost all cases, you want to be using passive mode.

share|improve this answer

Perhaps the FTP server is on an internal adress, and use masquerade. What does the logs of the ftp server say? (dunno where? find out what ftp server software and check for the logs in /var/log)

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.