15% discount for the first 3 months on cPanel management plans! Coupon:  CP15

Discover how to configure the FTP Passive Port range in your cPanel. Our cPanel Support team is on standby to address your queries and guide you through the process.

Understanding the FTP Passive Port Range Settings in cPanel

Administering a cPanel platform may come with its share of complications. Often, issues emerge due to the conflict between the firewall and FTP utilities like pure-ftpd or proftpd.

Consequently, users may encounter connection difficulties when employing the passive-transfer mode. This article provides an in-depth assessment of this challenge and the systematic solutions to ensure uninterrupted FTP connectivity on cPanel platforms.

Here is an illustration that represents the issue:

FTP Passive Port range cPanel | Guide

Our specialists have compiled the following steps to adjust the FTP configuration.

Steps for Pure-FTPd servers

  1. Firstly, access the server as the root user through SSH.
  2. Secondly, open the /var/cpanel/conf/pureftpd/local file or make a new one if it doesn’t exist.
  3. Thirdly, modify the `ForcePassiveIP` option in the file in line with our server’s setup. For instance, the ForcePassiveIP option can be set to the FTP server’s public IP address. ForcePassiveIP: 203.0.113.0 Alternatively, for a server outside a NAT configuration, the `ForcePassiveIP` option should take the below-listed format: ForcePassiveIP: ~
  4. Furthermore, the server’s default passive port range can be modified using the following commands: echo "PassivePortRange: 49152 65534" >> /var/cpanel/conf/pureftpd/local
    /usr/local/cpanel/scripts/setupftpserver pure-ftpd --force

  5. Next, configure the server to allow the passive port range through the firewall.
  6. Finally, restart the PureFTP service.

Steps for ProFTPD Servers

  1. Firstly, access the server as the root user through SSH.
  2. Secondly, open the /var/cpanel/conf/proftpd/local file or make a new one if it doesn’t exist.
  3. Thirdly, modify the `MasqueradeAddress` option in the file in line with our server’s setup. For instance, the MasqueradeAddress option can be set to the FTP server’s public IP address if the FTP server exists behind a NAT configuration: MasqueradeAddress: 203.0.113.0 Alternatively, for a server outside a NAT configuration, the `MasqueradeAddress` option should take the below-listed format: MasqueradeAddress: ~
  4. Furthermore, the server’s default passive port range can be modified using the below commands: echo "PassivePorts: 49152 65534" >> /var/cpanel/conf/proftpd/local
    /usr/local/cpanel/scripts/setupftpserver proftpd –force
  5. Next, configure the server to allow the passive port range through the firewall.
  6. Finally, restart the ProFTP service.

How to Set Up the Firewall

Note that Passive ports 49152 through 65534 are automatically enabled by default for both Pure-FTPd and ProFTPD servers.

  1. CSF Firewall Configuration: Modify /etc/csf/csf.conf to include the passive port range in TCP_IN. TCP_IN = "20,21,22,25,53,80,110,...,49152:65534" Reload the changes with the command `csf -r`.
  2. cPanel WHM Configuration:
    1. First, log in to WHM and navigate to Plugins.
    2. Then, select Configserver Firewall & Security.
    3. Next, go to Firewall Configuration and add the passive port range (49152:65534) to TCP_IN and TCP_OUT settings.
  3. Iptables Configuration: Add the following rule to unblock the ports in Iptables: iptables -I INPUT 2 -p tcp --dport 49152:65534 -j ACCEPT
  4. Finally, save the firewall rules with this command: service iptables save

By comprehending how FTP connections function on cPanel platforms and configuring the FTP utilities and firewalls accurately, we can address timeout problems and ensure smooth migrations.

Prepare to apply these solutions based on your specific server configuration and experience seamless FTP connectivity on your cPanel platform.

[Require support with a different issue? Our team is accessible 24/7.]

Conclusion

To sum up, our Support Gurus have shown how to configure the FTP Passive Port range in cPanel.

Avoid server crashes!

Don’t lose customers due to slow server speed ever again! Allow us to assist you.

Our team of server experts ensures round-the-clock monitoring and maintenance to keep your server lightning fast and secure.

Share this Post

Leave a Reply

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