How to set the PassivePortRange in pure-ftpd on Debian and Ubuntu Linux

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 and your firewall to ensure that the connections dont get blocked. The following example is for pure-ftpd on Debian or Ubuntu Linux and ISPConfig 3:

1) Configure pure-ftpd

echo "40110 40210" > /etc/pure-ftpd/conf/PassivePortRange
/etc/init.d/pure-ftpd-mysql restart

2) Configure the firewall. If you use ISPConfig 3 on my server to configure the bastille firewall, you can add the nescessera port range in the ISPConfig firewall settings.

Change the list of Open TCP ports from:




and then click on "Save".


6 thoughts on “How to set the PassivePortRange in pure-ftpd on Debian and Ubuntu Linux”

  1. Aaron says:

    Debian* instead of Denian in the title, and need to fix the > to > in the first command. Other than that, great mini tutorial.

    1. andreea says:

      Oops, small typo, thank you for your attention!

  2. You need to correct the first line of the first command. The Greater than symbol is being output as an unparsed HTML code, I would imagine due to it’s placement in the tag...

    1. Till says:

      Thanks for the note. The command is displayed correctly now.

  3. elhui2 says:

    Tanks man, great tuto :)

  4. Nag says:

    Thx for that short how-to. Just needed the info for pure-ftpd itself. Short and working – perfect. :)

Leave a Reply

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>