0

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>) Command: MLSD 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.

1

Do you have well configured your pure-ftpd config file with these params :

PassivePortRange  49152 65534
ForcePassiveIP AWS_SERVER_PUBLIC_IP

You can check what ports range is allowed on the OS with :

cat /proc/sys/net/ipv4/ip_local_port_range
  • Thanks for the response. Those settings were configured but what I did notice from your comment is that the PassivePortRange setting I had was incorrectly named as Passive Port Range. Changing this and restarting pure-ftpd fixed my issue. Cheers – Duncan Oct 31 '14 at 15:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.