How to change the FTP Port?

VPS88

New member
Joined
Jan 15, 2024
Messages
2
How to change the FTP Port?

I searched about this on Google and this forum but I couldn't find it.

I got help via Chat GPT and edited /etc/pure-ftpd.conf.

Its # Bind 127.0.0.1,21 instead of '21' in this line I changed it to 8001

Then added a new port to the csf firewall and rebooted the VPS.

I can't connect through the new port from Filezilla

please help me
 

Attachments

  • 1.png
    1.png
    31.4 KB · Views: 141
  • 2.png
    2.png
    30.4 KB · Views: 126
is your ftp service started? maybe apparmor or another firewall or selinux blocks changed port?
 
I can't connect through the new port from Filezilla
From home? If yes, have Filezilla try using PASV ftp and also open 35000:35999 outgoing in your CSF firewall.
Ports 35000:35999 are the passive ports which FTP is using in Directadmin.
Don't forget to restart csf and lfd after making changes in the config.

In the config, did you remove the # before the new port statement?
If yes, then FTP is only listening to 127.0.0.1 now so that won't work. Either change 127.0.0.1 to your external ip from your VPS or remove the 127.0.0.1 completely, so you only have ,8001 (mind the comma) so pure-ftpd will listen to all ip's.

What is the error message Filezilla is giving when trying to connect?
Also check if port 8001 is listening for example with this command:
lsof -i:8001
 
Back
Top