FTP Passive Mode Issue In WHM/Cpanel With CSF

FTP Passive Mode Issue In WHM/Cpanel With CSF

Installing a Firewall (eg: Config Security Firewall/CSF) is one step to hardening security of your webserver. But this come with an issue that CSF block PureFTPd/ProFTPd server, so your FTP client cannot connect to FTP server with passive mode. This is because CSF block the passive connection ports. To enable it you need set the ip range for passive connection, and make sure you are not block it from CSF.

To do that, you need to edit your FTP server configuration.

For PureFTPd:
open /etc/pure-ftpd.conf, and enable this line:

1
PassivePortRange    30000 35000

For ProFTPd:
open /etc/pure-ftpd.conf, and enable this line:

1
PassivePorts    30000 35000

Now you need to unblock that port range from CSF. Open CSF Firewall configuration from your WHM, and add that ports in TCP_IN, so it would like this:
TCP_IN: 20,21,22,25,53,80,110,143,443,30000:35000

Now restart both your CSF and FTP server. And once it done, you will able to connect to your FTP server with passive mode

  • FTP, WHM
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

DNS Management - How To Edit MX Records

DNS Management - How To Edit MX Records A mail exchanger (MX) record is a type of DNS record...

Cpanel Exim How To Clear The Mail Queue

  Cpanel Exim How To Clear The Mail Queue Here’s the proper way to clear the exim mail...

Creating a cPanel User Account

Creating a cPanel User Account To create a new account go toWHM >> Account Functions...

How can I limit access to certain directories on my server by requiring a password using cPanel/WHM?

How can I limit access to certain directories on my server by requiring a password using...

How do I backup my entire site in Cpanel?

How do I backup my entire site in Cpanel? Entire accounts can be backed up by doing the...