0

I have a web server (CentOS Web Panel) running in an AWS EC2 Instance.

I am connecting a bespoke application to the server which connects using MySQL and FTP.

I am having issues connecting to the FTP server (PureFTP).

I can connect to the FTP Server using Filezilla without any errors - although I get a warning message:

"Server sent passive reply with unroutable address. Using server address instead".

Now when I connect using the bespoke application (uses Chilkat FTP module fixed to passive mode) it just hangs on connecting.

Looking at the system log I am seeing the following messages:

Feb 13 12:26:23 hosting kernel: nf_ct_ftp: dropping packet: partial matching of `227 ' IN= OUT= SRC=172.31.9.153 DST=51.219.52.115 LEN=65 TOS=0x10 PREC=0x00 TTL=64 ID=11556 DF PROTO=TCP SPT=21 DPT=33158 SEQ=512403447 ACK=2693072523 WINDOW=421 RES=0x00 ACK PSH FIN URGP=0 OPT (0101050AA085068AA085068B)

172.31.9.153 is the AWS local IP and 51.219.52.115 is the local machine IP running the bespoke application.

My pureftp config is below:

ChrootEveryone:yes
BrokenClientsCompatibility:no
MaxClientsNumber:50
Daemonize:yes
MaxClientsPerIP:8
VerboseLog:no
DisplayDotFiles:yes
AnonymousOnly:no
NoAnonymous:no
SyslogFacility:ftp
DontResolve:yes
MaxIdleTime:15
PureDB:/etc/pure-ftpd/pureftpd.pdb
PAMAuthentication:yes
UnixAuthentication:yes
LimitRecursion:10000 8
AnonymousCanCreateDirs:no
MaxLoad:4
PassivePortRange:30000 35000
AntiWarez:yes
Umask:133:022
MinUID:1000
UseFtpUsers:no
AllowUserFXP:no
AllowAnonymousFXP:no
ProhibitDotFilesWrite:no
ProhibitDotFilesRead:no
AutoRename:no
AnonymousCantUpload:yes
AltLog:clf:/var/log/pureftpd.log
MaxDiskUsage:99
CustomerProof:yes

I've opened ports 30000 35000 in AWS as well as in the CSF firewall (and tried with the firewall disabled).

Can anyone shed any light on these strange errors or spot anything I have setup incorrectly?

1 Answer 1

0

Found the issue, pure-ftp was responding with the local NAT IP address rather than the public IP address of the server.

I needed to set the option:

ForcePassiveIP 54.194.63.112

This wasn't appearing in the CWP settings so I had to edit it in manually into the file /etc/pure-ftpd/pure-ftpd.conf.

Once this was entered and the ftp service restarted, everything started working.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .