You may need to change the default FTP port 21 to any other port like 1234 for security reasons.
We'll provide a step-by-step tutorial on how to change the pure-ftp port on a cPanel server.
cPanel provides an easy way to update pure-ftp config from this file:
- Login to SSH as
- Edit the config file with nano or your preferred editor
# nano /var/cpanel/conf/pureftpd/local
Bind: 1234to the file (where 1234 is the new port number)
Enterto exit and save.
- restart FTP using this command
/usr/local/cpanel/scripts/setupftpserver pure-ftpd --force
- Finally, add the new port to the firewall
If you use firewalld on CentOS 7, use the following command to open the port 1234:
$ sudo firewall-cmd --permanent --zone=public --add-port=1234/tcp
$ sudo firewall-cmd --reload
If you use CSF, find the config file and open it with nano or your preferred editor
$ nano /etc/csf/csf.conf
Find TCP_IN line and remove the old port number and replace it with the new port or add the new port at the end of this line like:
TCP_IN = "80,443,465,21,22,587,993,25,53 ... ,1234"
Restart CSF using this command
$ csf -r
HostRound LLC is a cPanel certified partner, we'll be more than happy to be your hosting provider. Please check our services from this link: https://www.hostround.com/services