How To Change FTP Port (21) in Linux

In Linux, we have several protocols that give us the possibility to carry out administrative tasks, communication, and many others.

One of these, known to all, is the FTP protocol (File Transfer Protocol) through which we can make transfers between several computers.

A good security practice is to modify the FTP port by default to prevent attackers from accessing it; today we will see how to achieve it.

Modify Default Port 21 Linux FTP

1. To modify the default port of the Proftpd service in Linux, we must open the main Proftpd configuration file to edit the desired editor as follows:

sudo nano /etc/proftpd.conf (CentOS & RedHat)

sudo nano /etc/proftpd/proftpd.conf (Debian & Ubuntu)

2. Locate the “Port” line, and we will see that it is the default port (21):

3. There it is enough to edit the port for which we want, in this case, 7777:

4. We save the changes using the following key combination: Ctrl + O

5. We exit the editor using: Ctrl + X

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *