FTP active data connection port

jmakila

Registered
Sep 4, 2015
2
0
1
Turku, Finland
cPanel Access Level
Root Administrator
Hi, I have a problem where I try to connect to my server with an FTP client and the connection at some point tries to connect to a random data port > 50000.

Code:
12:38:02    Status:    Retrieving directory listing...
12:38:03    Command:    PWD
12:38:03    Response:    257 "/" is your current location
12:38:03    Command:    TYPE I
12:38:03    Response:    200 TYPE is now 8-bit binary
12:38:03    Command:    PORT 84,250,33,186,204,143
12:38:03    Response:    200 PORT command successful
12:38:03    Command:    MLSD
12:38:03    Response:    425 Could not open data connection to port 52367: Connection refused
12:38:03    Error:    Failed to retrieve directory listing
Obviously a firewall blocks that connection. Changing my data center firewall settings is something too arduous to think about, except maybe as a last resort.
I though that FTP would use port 21 or 22 normally. I'm using pure-ftp as the ftp server. I have passive mode disabled and using active mode on the client too (which is FileZilla). Why is the client trying to connect to a port like that and can I somehow change the port(s) used?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,883
2,256
463
Hello :)

I'm happy to see you were able to determine the cause of the issue. Thank you for updating us with the outcome.