1

What is dropping my connection and why?

The file download over FTPeS between server and client stops at the exact same amount of files every time with no hint why the connection is cancelled. It doesn't matter how big the files are or how long it takes to download those files. It doesn't matter which server software is used on the server side, same goes for the client software. I tried it with Microsoft IIS FTP and FileZilla Server on the server side and with FileZilla Client, WinSCP and a self written client (Delphi) on the client side.

In my example case it is exactly 296 txt files between server machine A and client machine B. Between server machine A and client machine C it's another amount, but constant/steady/unchanged.

network on server side

The WAN connection is the german ISP Deutsche Telekom AG, VDSL2 with a pseudo static public IP address (lasts for approx. a month, after that it gets changed). The router and hardware firewall is a common (in germany) FRITZ!Box 7590 with FRITZ!OS: 07.01.

WAN connection

I have configured port forwarding for the FTP control channel and for the passive mode data channels.

  • Control channel: TCP 21 extern to 21 intern
  • Data channels: TCP 50000-50010 extern to 50000-50010 intern

port forwarding

Server machine

The server machine is a Microsoft Windows 10 Pro 1903 (10.0.18362 N/A Build 18362.239) connected with the router over a 1 Gbps Cat5e FTP cable.

Windows Defender Firewall

I have opened the required ports on Windows Defender Firewall.

enter image description here

Microsoft IIS FTP configuration

The IIS is listening for the control channel on TCP Port 21. The data channels are set to TCP 50000-50010 in conformity with the port forwarding. A SSL connection is required for both channels, control and data.

IIS data channel port range IIS listening port control channel

FileZila Server

Same configurations required configurations. TCP Port 21 (control), 50000-50010 (data).

filezilla server configuration 1 filezilla server configruation 2 filezilla server configuration 3

clients

This is the FileZilla client log when downloading over IIS.

2019-08-04 02:21:44 8736 3 Response: 226 Transfer complete.
2019-08-04 02:21:44 8736 3 Status: File transfer successful, transferred 4.096 bytes in 1 second
2019-08-04 02:21:44 8736 2 Response: 227 Entering Passive Mode (84,145,49,252,195,87).
2019-08-04 02:21:44 8736 2 Command: RETR random_file_433.txt
2019-08-04 02:21:44 8736 3 Status: Starting download of /Files/random_file_432.txt
2019-08-04 02:21:44 8736 3 Command: PASV
2019-08-04 02:21:44 8736 2 Response: 150 Opening BINARY mode data connection.
2019-08-04 02:21:44 8736 3 Response: 227 Entering Passive Mode (84,145,49,252,195,88).
2019-08-04 02:21:44 8736 3 Command: RETR random_file_432.txt
2019-08-04 02:21:44 8736 3 Error: Disconnected from server: ECONNABORTED - Connection aborted
2019-08-04 02:21:44 8736 3 Error: File transfer failed
2019-08-04 02:21:44 8736 3 Status: Disconnected from server
2019-08-04 02:21:44 8736 2 Response: 226 Transfer complete.
2019-08-04 02:21:44 8736 2 Status: File transfer successful, transferred 6.103 bytes in 1 second
2019-08-04 02:21:44 8736 3 Status: Resolving address of home.zaffran.de
2019-08-04 02:21:44 8736 2 Status: Starting download of /Files/random_file_431.txt
2019-08-04 02:21:44 8736 2 Command: PASV
2019-08-04 02:21:44 8736 2 Response: 227 Entering Passive Mode (84,145,49,252,195,89).
2019-08-04 02:21:44 8736 2 Command: RETR random_file_431.txt
2019-08-04 02:21:44 8736 3 Status: Connecting to 84.145.49.252:21...
2019-08-04 02:21:44 8736 2 Error: Disconnected from server: ECONNABORTED - Connection aborted
2019-08-04 02:21:44 8736 2 Error: File transfer failed
2019-08-04 02:21:44 8736 3 Status: Connection established, waiting for welcome message...
2019-08-04 02:21:44 8736 2 Status: Disconnected from server
2019-08-04 02:21:44 8736 2 Status: Resolving address of home.zaffran.de
2019-08-04 02:21:44 8736 2 Status: Connecting to 84.145.49.252:21...
2019-08-04 02:21:44 8736 3 Response: 220 Microsoft FTP Service
2019-08-04 02:21:44 8736 3 Command: AUTH TLS
2019-08-04 02:21:44 8736 2 Status: Connection established, waiting for welcome message...
2019-08-04 02:21:44 8736 3 Response: 234 AUTH command ok. Expecting TLS Negotiation.
2019-08-04 02:21:44 8736 3 Status: Initializing TLS...
2019-08-04 02:21:44 8736 2 Response: 220 Microsoft FTP Service
2019-08-04 02:21:44 8736 2 Command: AUTH TLS
2019-08-04 02:21:44 8736 2 Response: 234 AUTH command ok. Expecting TLS Negotiation.

This is the FileZilla client log when downloading over FileZilla Server

2019-08-04 10:57:35 3724 2 Response: 226 Successfully transferred "/Files/random_file_596.txt"
2019-08-04 10:57:35 3724 2 Status: File transfer successful, transferred 1.024 bytes in 1 second
2019-08-04 10:57:35 3724 2 Status: Starting download of /Files/random_file_594.txt
2019-08-04 10:57:35 3724 2 Command: PASV
2019-08-04 10:57:35 3724 3 Response: 150 Opening data channel for file download from server of "/Files/random_file_595.txt"
2019-08-04 10:57:35 3724 2 Response: 227 Entering Passive Mode (84,145,49,252,195,80)
2019-08-04 10:57:35 3724 2 Command: RETR random_file_594.txt
2019-08-04 10:57:35 3724 3 Response: 226 Successfully transferred "/Files/random_file_595.txt"
2019-08-04 10:57:35 3724 3 Status: File transfer successful, transferred 2.048 bytes in 1 second
2019-08-04 10:57:35 3724 3 Status: Starting download of /Files/random_file_593.txt
2019-08-04 10:57:35 3724 3 Command: PASV
2019-08-04 10:57:35 3724 3 Response: 227 Entering Passive Mode (84,145,49,252,195,90)
2019-08-04 10:57:35 3724 3 Command: RETR random_file_593.txt
2019-08-04 10:57:35 3724 2 Error: Disconnected from server: ECONNABORTED - Connection aborted
2019-08-04 10:57:35 3724 2 Error: File transfer failed
2019-08-04 10:57:35 3724 3 Error: Disconnected from server: ECONNABORTED - Connection aborted
2019-08-04 10:57:35 3724 3 Error: File transfer failed
2019-08-04 10:57:35 3724 2 Status: Disconnected from server
2019-08-04 10:57:35 3724 2 Status: Resolving address of home.zaffran.de
2019-08-04 10:57:35 3724 2 Status: Connecting to 84.145.49.252:21...
2019-08-04 10:57:35 3724 2 Status: Connection established, waiting for welcome message...
2019-08-04 10:57:35 3724 3 Status: Disconnected from server
2019-08-04 10:57:35 3724 3 Status: Resolving address of home.zaffran.de
2019-08-04 10:57:35 3724 3 Status: Connecting to 84.145.49.252:21...
2019-08-04 10:57:35 3724 2 Response: 220 Muhahahaaa
2019-08-04 10:57:35 3724 2 Command: AUTH TLS
2019-08-04 10:57:35 3724 3 Status: Connection established, waiting for welcome message...
2019-08-04 10:57:35 3724 2 Response: 234 Using authentication type TLS
2019-08-04 10:57:35 3724 2 Status: Initializing TLS...
2019-08-04 10:57:35 3724 3 Response: 220 Muhahahaaa
2019-08-04 10:57:35 3724 3 Command: AUTH TLS
2019-08-04 10:57:35 3724 3 Response: 234 Using authentication type TLS
2019-08-04 10:57:35 3724 3 Status: Initializing TLS...
2019-08-04 10:57:35 3724 2 Status: Verifying certificate...
2019-08-04 10:57:35 3724 2 Status: TLS connection established.
2019-08-04 10:57:35 3724 2 Command: USER test
2019-08-04 10:57:35 3724 2 Response: 331 Password required for test
2019-08-04 10:57:35 3724 2 Command: PASS *******
2019-08-04 10:57:35 3724 3 Status: Verifying certificate...
2019-08-04 10:57:35 3724 3 Status: TLS connection established.
2019-08-04 10:57:35 3724 3 Command: USER test
2019-08-04 10:57:35 3724 2 Response: 230 Logged on
2019-08-04 10:57:35 3724 2 Command: PBSZ 0
2019-08-04 10:57:35 3724 3 Response: 331 Password required for test
2019-08-04 10:57:35 3724 3 Command: PASS *******
2019-08-04 10:57:35 3724 2 Response: 200 PBSZ=0
2019-08-04 10:57:35 3724 2 Command: PROT P
2019-08-04 10:57:35 3724 3 Response: 230 Logged on
2019-08-04 10:57:35 3724 3 Command: PBSZ 0
2019-08-04 10:57:35 3724 2 Response: 200 Protection level set to P
2019-08-04 10:57:35 3724 2 Status: Logged in
2019-08-04 10:57:35 3724 3 Response: 200 PBSZ=0
2019-08-04 10:57:35 3724 3 Command: PROT P
2019-08-04 10:57:35 3724 2 Status: Starting download of /Files/random_file_592.txt
2019-08-04 10:57:35 3724 2 Command: CWD /Files
2019-08-04 10:57:35 3724 3 Response: 200 Protection level set to P
2019-08-04 10:57:35 3724 3 Status: Logged in
2019-08-04 10:57:35 3724 2 Response: 250 CWD successful. "/Files" is current directory.
2019-08-04 10:57:35 3724 2 Command: TYPE I
2019-08-04 10:57:35 3724 3 Status: Starting download of /Files/random_file_591.txt
2019-08-04 10:57:35 3724 3 Command: CWD /Files
2019-08-04 10:57:35 3724 2 Response: 200 Type set to I
2019-08-04 10:57:35 3724 2 Command: PASV
2019-08-04 10:57:35 3724 3 Response: 250 CWD successful. "/Files" is current directory.
2019-08-04 10:57:35 3724 3 Command: TYPE I
2019-08-04 10:57:35 3724 2 Response: 227 Entering Passive Mode (84,145,49,252,195,81)

This is how it looks like with WinSCP when downloading over FileZilla Server

WinSCP error

This is the log of my self written Delphi FTP Client when downloading over FileZilla Server

Sent 04.08.2019 11:06:52: RETR random_file_297.txt<EOL>
Recv 04.08.2019 11:06:52: 150 Opening data channel for file download from server of "/Files/random_file_297.txt"<EOL>
Recv 04.08.2019 11:06:52: 226 Successfully transferred "/Files/random_file_297.txt"<EOL>
Sent 04.08.2019 11:06:53: PASV<EOL>
Recv 04.08.2019 11:06:53: 227 Entering Passive Mode (84,145,49,252,195,84)<EOL>
Sent 04.08.2019 11:06:53: RETR random_file_298.txt<EOL>
Recv 04.08.2019 11:06:53: 150 Opening data channel for file download from server of "/Files/random_file_298.txt"<EOL>
Recv 04.08.2019 11:06:53: 226 Successfully transferred "/Files/random_file_298.txt"<EOL>
Sent 04.08.2019 11:06:53: PASV<EOL>
Recv 04.08.2019 11:06:53: 227 Entering Passive Mode (84,145,49,252,195,85)<EOL>
Sent 04.08.2019 11:06:53: RETR random_file_299.txt<EOL>
Recv 04.08.2019 11:06:53: 150 Opening data channel for file download from server of "/Files/random_file_299.txt"<EOL>
Stat Disconnected.
Stat Disconnected.

0 Answers0