unixcop Admin

How to set PassivePortRange and PassiveIP in pure-ftpd on Ubuntu to secure the app!


Hi guys, We will talk about setting PassivePortRange and PassiveIP in pure-ftpd.

If you run a firewall on your Linux server and want to use passive FTP connections, you have to define the passive port range in pure-ftpd .

The following example is for pure-ftpd on Ubuntu and ISPConfig 3.

Follow this steps to Set Passive Port Range in PureFTPD

Set PassivePortRange and PassiveIP in pure-ftpd on Ubuntu

  •  Configure pure-ftpd
echo "40110 40210" > /etc/pure-ftpd/conf/PassivePortRange
  • Then Restart pure-ftpd-mysql
service pure-ftpd-mysql restart
  • Configure the firewall. If you use ISPConfig 3 on your server to configure the Bastille firewall, you can add the necessary port range in the ISPConfig firewall settings, So change the list of Open TCP ports like that:


  • Then save and quit

Set Passive IP in PureFTPD

Setting a passive IP in FTP might be necessary when your server is located behind a NAT router. You will get an error like “Error: Server returned unroutable private IP address in PASV reply” from your FTP client in such a case.

  • To set a passive IP address, run this command:
echo "" > /etc/pure-ftpd/conf/ForcePassiveIP
  • Replace with the External IP address that clients shall use to connect to the FTP server.
  • Then restart pureFTPD:
service pure-ftpd-mysql restart


That’s it

We illustrated how to set PassivePortRange and PassiveIP in pure-ftpd on Ubuntu.


app website


Please enter your comment!
Please enter your name here

Latest articles

Join us on Facebook