I have a centos server running pure-ftp via aws. I have configured PureDB and added a user with correct permissions. I have opened up inbound ports 20/21 and 49152-65534 within the aws security group and then mapped these ports back into pure-ftpd using the
Passive Port Range setting in the pure-ftpd config file. At this stage testing on the machine using
ftp localhost works as expected; I can connect with my user and list the files.
Now when trying to connect to the server from my machine I added the
ForcePassiveIP setting on the server and set as the public ip for the aws instance, then tried to connect;
ftp <public-ip>. The connection works, I can login, but 90% of the time the passive connection is hanging and just displays
227 Entering Passive Mode (<public-ip>,<ports>) when I try to list the files. Similarly trying to upload a new file using an ftp client will hang and then fail:
Response: 227 Entering Passive Mode (<public-ip>,<ports>)
Error: Connection timed out
Error: Failed to retrieve directory listing
Does anybody have any idea why this would be happening? Any help would be much appreciated.
NOTE: I had a similar issue on a Vagrant machine with the same OS/settings (minus the
ForcePassiveIPsetting) and this worked fine after running
modprobe ip_conntrack_ftp, however this is not the case for the aws server.