How to Change ProFTPD Passive Ports and Make the Configuration Persistent?
ProFTPD is a highly configurable FTP server with a focus on efficiency and ease of use. One of its features is the ability to change passive ports, which can be useful for managing remote connections. This guide will walk you through the process of changing the ProFTPD passive ports and ensuring that the configuration remains persistent during updates and reboots.
How to Configure ProFTPD Passive Ports?
Connect to your server and check for any already configured passive ports.
The default configuration file is located at /etc/proftpd.conf.
/etc/proftpd.conf
It should look something like this PassivePorts: 49185 65200
PassivePorts: 49152 65534
If there are no passive ports configured, you can do it by creating a local config file in the ProFTPD folder. Use the following command:
touch /etc/proftpd.d/local.conf
Open the file and add "PassivePorts 49152 65535" or use the following command on terminal.
echo "PassivePorts 49152 65535" >> /etc/proftpd.d/local.conf
Restart ProFTPD Service
After making these changes, restart the ProFTPD service for the changes to take effect. Use the following command:
service proftpd restart
Change ProFTPD Passive Ports on cPanel and Make the Configuration Persistent
When you change the passive ports on the default configuration file, the passive ports change during the current boot only. You may notice that during cPanel updates and system reboots the passive ports revert to the default range. To avoid this change from happening, you need to make sure that the configuration is persistent during cPanel updates and reboots. Use the following command on terminal to create a passive ports persistent configuration file.
echo "PassivePorts: 49152 65534" >> /var/cpanel/conf/proftpd/local /usr/local/cpanel/scripts/setupftpserver proftpd --force
After making these changes, restart the ProFTPD service for the changes to take effect. Use the following command:
service proftpd restart
Congratulations, you have changed the ProFTPD passive ports and made the configuration persistent during updates and reboots.
Articles Sharing the Same Category
- How to Generate OpenVPN Client Configuration Files?
- Domain has exceeded the max defers and failures per hour
- How to SFTP to a server with a private key?
- How to Manage API tokens in cPanel WHM?
- How To Set Up and Configure an OpenVPN Server on Linux?