Changing FTP Passive ports
How to change the FTP Passive ports from 49152:65534 to some other values ?
I'm getting some sort of attacks on those Ports so let me know the recommend way
-
- Log in to the server as the root user via SSH - Take a backup of the configuration file #cp /etc/pure-ftpd.conf /etc/pure-ftpd.conf-backup
- Open configuration file /etc/pure-ftpd.conf#vi /etc/pure-ftpd.conf
- SearchPassivePortRange
and update the port range you want.PassivePortRange 49152 65534
- Restart the service for changes to be effective#systemctl restart pure-ftpd.service0 -
- Log in to the server as the root user via SSH - Take a backup of the configuration file
#cp /etc/pure-ftpd.conf /etc/pure-ftpd.conf-backup
- Open configuration file /etc/pure-ftpd.conf#vi /etc/pure-ftpd.conf
- SearchPassivePortRange
and update the port range you want.PassivePortRange 49152 65534
- Restart the service for changes to be effective#systemctl restart pure-ftpd.service
I had tried it before but whenever we restart the port range was changing to default values0 -
Try: #echo "PassivePortRange: 49152 65534" >> /var/cpanel/conf/pureftpd/local #/usr/local/cpanel/scripts/setupftpserver pure-ftpd --force
NOTE: Replace the port range you want.0 -
Please check if your server had any firewall which is causing issue try to stop server firewall and then try again. 0 -
Sure - you can set them to any range you want. You'll just need to make sure you open them in the server's firewall as well. 0
Please sign in to leave a comment.
Comments
7 comments