{"id":303,"date":"2019-11-11T21:46:07","date_gmt":"2019-11-11T23:46:07","guid":{"rendered":"http:\/\/xaxowareti.com.br\/?p=303"},"modified":"2019-11-11T21:47:24","modified_gmt":"2019-11-11T23:47:24","slug":"how-to-set-passiveportrange-and-passiveip-in-pure-ftpd-on-debian-and-ubuntu-linux","status":"publish","type":"post","link":"https:\/\/xaxowareti.com.br\/?p=303","title":{"rendered":"How to set PassivePortRange and PassiveIP in pure-ftpd on Debian and Ubuntu Linux"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">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 don&#8217;t get blocked. The following example is for pure-ftpd on Debian or Ubuntu Linux and ISPConfig 3.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Set Passive Port Range in PureFTPD<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">1) Configure pure-ftpd<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">echo \"40110 40210\" &gt; \/etc\/pure-ftpd\/conf\/PassivePortRange\nservice pure-ftpd-mysql restart<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">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.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Change the list of Open TCP ports from:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">20,21,22,25,53,80,110,143,443,3306,8080,10000<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">to:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">20,21,22,25,53,80,110,143,443,3306,8080,10000,40110:40210<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">and then click on &#8220;Save&#8221;.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Set Passive IP in PureFTPD<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Setting a passive IP in FTP might be necessary when your server is located behind a NAT router. You will get an error like &#8220;<strong>Error: Server returned unroutable private IP address in PASV reply<\/strong>&#8221; from your FTP client in such a case.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To set a passive IP address, run this command:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">echo \"1.2.3.4\" &gt; \/etc\/pure-ftpd\/conf\/ForcePassiveIP<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Replace 1.2.3.4 with the External IP address that clients shall use to connect to the FTP server. Then restart pureFTPD:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">service pure-ftpd-mysql restart<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>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 don&#8217;t get blocked. The following example is for pure-ftpd on Debian or Ubuntu Linux and ISPConfig 3. Set Passive Port Range [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":277,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-303","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-sem-categoria"],"_links":{"self":[{"href":"https:\/\/xaxowareti.com.br\/index.php?rest_route=\/wp\/v2\/posts\/303","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/xaxowareti.com.br\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/xaxowareti.com.br\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/xaxowareti.com.br\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/xaxowareti.com.br\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=303"}],"version-history":[{"count":1,"href":"https:\/\/xaxowareti.com.br\/index.php?rest_route=\/wp\/v2\/posts\/303\/revisions"}],"predecessor-version":[{"id":304,"href":"https:\/\/xaxowareti.com.br\/index.php?rest_route=\/wp\/v2\/posts\/303\/revisions\/304"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/xaxowareti.com.br\/index.php?rest_route=\/wp\/v2\/media\/277"}],"wp:attachment":[{"href":"https:\/\/xaxowareti.com.br\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=303"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/xaxowareti.com.br\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=303"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/xaxowareti.com.br\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=303"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}