Linux

Fix the issue of not being able to access FTP when CSF firewall is enabled on cPanel

If you are unable to access FTP when CSF (ConfigServer Security & Firewall) is enabled on cPanel, it may be due to the firewall configuration not being set to allow FTP connections.

1. First, check the PassivePortRange.

 cat /var/cpanel/conf/pureftpd/main | grep PassivePortRange

Output

PassivePortRange: 49152 65534

Therefore, the PassivePortRange for FTP will be 49152 -> 65534.

2. Please access the csf.conf file to open the FTP port range.

vi /etc/csf/csf.conf

To open the port range in TCP_IN, add the range 49152:65534.

3. After that, restart CSF using the command

csf -r

Thanks fo visiting my website