Change FTP Port with WHM & CSF
How to Open Ports for Passive FTP in CSF (Configserver Firewall & Security)
How to change the FTP port for PureFTPd



1. Use your preferred text editor, such as vi or nano to create or edit the /var/cpanel/conf/pureftpd/local file.

2. Set the port number the to the port of your choosing using the "Bind" variable. Make sure that you select a port that is not already in use by another service, and ensure that the port is not blocked by your firewall software or otherwise inaccessible. An example of this file's contents when setting "Bind" is included below:


port ftp overwrite



:
nano /var/cpanel/conf/pureftpd/local


:
 Bind: 1234
1234 21


3. To apply your changes, perform a force update of FTP with the following command:


local
:
 /scripts/setupftpserver pure-ftpd --force


4. Confirm the FTP service is now listening on the new port number. For example, I used port 6021:

:
  lsof -P -n -i :1234

(LISTEN)



-------------------------
CSF
-------------------------
21 1234

ports passive ftp

Find the setting TCP_IN and TCP_OUT in the list, and add the following to each:

:
49152:65534


:
TCP_IN = "20,1234,22,25,53,80,110,143,443,465,587,993,995,2077,2078,2079,2080,2082,2083,2086,2087,2095,2096,49152:65534"
1234

:
nano /etc/csf/csf.conf
-------------------------

ftp csf


FTP Cpanel Active vs Passive


:
https://www.ndchost.com/wiki/guides/...-csf-on-cpanel
https://support.cpanel.net/hc/en-us/...t-for-PureFTPd
https://support.cpanel.net/hc/en-us/...o-CSF-Firewall
https://docs.cpanel.net/knowledge-ba...-passive-mode/