How to change pure-ftpd port

pure-ftpd by default listens on port 21. We will change the FTP port from 21 to some other port. This instruction work for RHEL, CentOS, AlmaLinux, Oracle Linux, and RockeyLinux.

To change FTP port to some other port, edit file

vi /etc/pure-ftpd/pure-ftpd.conf

Find

# Bind                         127.0.0.1,21

Add below

Bind                        FTP_PORT_HERE

Example

[root@backendz ~]# cat /etc/pure-ftpd/pure-ftpd.conf  | grep -i bind
# Bind                         127.0.0.1,21
Bind                        2121 
[root@backendz ~]# 

This will change FTP port to 2121.

Restart pure-ftpd with command.

systemctl start pure-ftpd

Comments

Leave a Reply

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