• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

FTP connection dies midway through transfer

cmaxwell

Regular Pleskian
One of our servers is having a problem with FTP. It begins file uploads and after about 1MB of data transfer the connection drops.

If we disable the iptables firewall then it works fine.

I set the passive ports in /etc/proftpd.conf:

PassivePorts 49152 65534

And opened the ports in the firewall:

/sbin/iptables -A INPUT -p tcp -m tcp --dport 49152:65534 --syn -j ACCEPT

Other than this we don't have any other customisations on the firewall.

Any ideas? I'm guessing it's a problem with the firewall but find it very strange that it starts the file transfer then stops.

Thanks.

- Chris
 
Does anyone have a sample iptables file that works well with ftp.. I'm having similar issues. Just a directory listing via ftp takes like 5 seconds with firewall on.
 
We found that this problem was caused by the first rule in the firewall:

-A INPUT -p tcp -m tcp ! --tcp-flags SYN,RST,ACK SYN -j REJECT --reject-with tcp-reset

Try removing that rule from your firewall ruleset and it should start working.

- Chris
 
Back
Top