{"id":778,"date":"2021-01-09T14:56:59","date_gmt":"2021-01-09T14:56:59","guid":{"rendered":"https:\/\/www.kolkataonweb.com\/code-bank\/?p=778"},"modified":"2021-04-09T10:15:38","modified_gmt":"2021-04-09T09:15:38","slug":"pure-ftpd-on-amazon-ec2","status":"publish","type":"post","link":"https:\/\/www.kolkataonweb.com\/code-bank\/miscellaneous\/pure-ftpd-on-amazon-ec2\/","title":{"rendered":"Pure-FTPd Error on Amazon EC2"},"content":{"rendered":"<p>Pure-FTPd error &#8220;<em>500 I won&#8217;t open a connection to &lt;IP ADDRESS&gt;<\/em>&#8221; OR &#8220;<em>Server sent passive reply with unroutable address. Using server address instead.<\/em>&#8221;<\/p>\n<p>This happens when the server is beyond a NAT like the Amazon EC2. The most posted solution on the internet is to fallback to &#8220;Passive&#8221; mode in the FTP client. But in my case that didn&#8217;t help and still I got the same error. After more digging found the solution.<\/p>\n<p>Need to create two files <span class=\"\">ForcePassiveIP<\/span> and <span class=\"\">PassivePortRange and put the port range and the Public IP of the server.<\/span><\/p>\n<pre class='wp-code-highlight prettyprint'><span class=\"\">echo \"40110 40210\" &gt; \/etc\/pure-ftpd\/conf\/PassivePortRange <\/span>\r\n\r\n<span class=\"\">echo \"1.2.3.4\" &gt; \/etc\/pure-ftpd\/conf\/ForcePassiveIP<\/span><\/pre>\n<p>1.2.3.4 is the external IP address of the EC2 instance.<\/p>\n<p>Didn&#8217;t make any changes to <strong>\/etc\/pure-ftpd\/pure-ftpd.conf<\/strong>. Specially didn&#8217;t restrict or set the &#8220;<em>IPv4 Only<\/em> &#8220;. With IPv4 only I face problems with some internet connections which uses IPv6.<\/p>\n<p><strong>Settings for FileZilla<\/strong><\/p>\n<pre class='wp-code-highlight prettyprint'>Encryption: require explicit FTP over TLS\r\nTransfer mode: Passive (PASV)<\/pre>\n<p>Restart Pure-FTPd. The command may vary based on which package has been used.<\/p>\n<pre class='wp-code-highlight prettyprint'>service pure-ftpd-mysql stop\r\nservice pure-ftpd-mysql start<\/pre>\n<p>Hope this helps someone.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Pure-FTPd error &#8220;500 I won&#8217;t open a connection to &lt;IP ADDRESS&gt;&#8221; OR &#8220;Server sent passive reply with unroutable address. Using server address instead.&#8221; This happens when the server is beyond a NAT like the Amazon EC2. The most posted solution on the internet is to fallback to &#8220;Passive&#8221; mode in the FTP client. But in&hellip; <a class=\"more-link\" href=\"https:\/\/www.kolkataonweb.com\/code-bank\/miscellaneous\/pure-ftpd-on-amazon-ec2\/\">Continue reading <span class=\"screen-reader-text\">Pure-FTPd Error on Amazon EC2<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[239,238,259,260,263,261,278,262,264,279],"class_list":["post-778","post","type-post","status-publish","format-standard","hentry","category-miscellaneous","tag-aws-ec2","tag-ec2","tag-ftp-server","tag-pure-ftpd","tag-pure-ftpd-500-error","tag-pure-ftpd-mysql","tag-pure-ftpd-ec2","tag-pure-ftpd-error","tag-pure-ftpd-error-500","tag-server-sent-passive-reply","entry"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.kolkataonweb.com\/code-bank\/wp-json\/wp\/v2\/posts\/778","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.kolkataonweb.com\/code-bank\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.kolkataonweb.com\/code-bank\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.kolkataonweb.com\/code-bank\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.kolkataonweb.com\/code-bank\/wp-json\/wp\/v2\/comments?post=778"}],"version-history":[{"count":5,"href":"https:\/\/www.kolkataonweb.com\/code-bank\/wp-json\/wp\/v2\/posts\/778\/revisions"}],"predecessor-version":[{"id":812,"href":"https:\/\/www.kolkataonweb.com\/code-bank\/wp-json\/wp\/v2\/posts\/778\/revisions\/812"}],"wp:attachment":[{"href":"https:\/\/www.kolkataonweb.com\/code-bank\/wp-json\/wp\/v2\/media?parent=778"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.kolkataonweb.com\/code-bank\/wp-json\/wp\/v2\/categories?post=778"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.kolkataonweb.com\/code-bank\/wp-json\/wp\/v2\/tags?post=778"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}