Sometimes our cPanel server support clients complaints that they are getting connection timeout error while connecting through FTP on cPanel servers, take a look at how to resolve the error
!connection failed xx.xx.xxx.xxx – connection timed out
!connectio:error 0
PORT xxx,xxx,x,x,x,xxx
500 Illegal PORT command
!Failed “port”
!Retrieve of folder listing failed (0)
The above error happens when we are able to connect but the folder listing fails!
Resolution:
Login to the WHM==> FTP Server Selection
change the FTP server to Pure-FTPD ==> save
Now ssh into the server as root
open the pure-ftp conf file /etc/pure-ftpd.conf
Find the FTP port no: used
And find the “PassivePortRange” and add the port range
for eg :
PassivePortRange 30000 35000
Save and quit
Now goto csf(firewall) config file, add the ftp port along with the passive port range
eg :
# Allow incoming TCP ports
TCP_IN = “20,22,25,53,80,110,143,443,465,587,993,995,2001,2077,2078,2082,2083,2086,2087,2095,2096,30000:35000”
Restart csf & Pure-ftpd