Recent FTP-problem

I have always been using the standard Windows10 FTP-program to upload a file to a FTP-server.

Never had problems with that till recently.

When I execute exactly the same script (or do it interactively), connecting to the server works, but the “PUT filename” initiates a PORT which is also sucessful. But after that, after a long time, I get the error “425 Can’t open data connection”.
At the server, the file which was uploaded is 0-byte long.

I have the impression this started with one of the last IPFIRE-updates.

Has something changed in IPFIRE which needs a new/different configuration to make this work again ?

The strange thing is, when I use a FTP-connection in TotalCommander and transfer the same file : no problems at all and the file is uploaded correctly.

So I’m confused about what’s going on !

Thanks

Do I get you right?

Software A doesn’t work, Software B works, but it’s the server’s fault? Because of an core update while Windows 10 doesn’t update, at least every month? Funny! :unamused:

No, you didn’t get it right !

  1. I didn’t write anything about (server-)fault, reread please
  2. between Working and NotWorking, the only related thing that changed in my complete environment is the Core-update(s) of IPFIRE !
  3. Windows-updates are NOT automatic here and ftp.exe is File Version 10.0.17763.1 dated 15/09/2018 !
    :unamused:

Do you use the command line in win10 to transfer the file or it is a gui program? …

That is the point. You didn’t write much at all. Where is the server running? On ipfire or another computer?

Aha now you are certain about that.

Mine is 10.0.18362.1 - 19.03.2019

ftp.exe has no gui - tui only!

The “425 cannot open data connection” error looks like an Active v. Passive issue with ftp. In Active, ftp will start a negotiation on port 21 and send data over port 20. In Passive mode, data is sent over a high port. That may explain why TotalCommander works (which may use PASV) but basic ftp does not.

ftp.exe on Windows AFAIK don’t support PASV Try to use WinSCP.

ftp.exe is used in a batch(command)-file

If your server is Linux, then from it try:

curl -O {http://whatever file}

That should avoid the passive v active issue. The same could be done from a Linux workstation but I don’t know how/if it would work from Win

Exactly ! Thanks for the constructive reply

That’s what I was thinking of and wrote “needs a new/different configuration” because I see no other reason why this problem suddenly started. Somehow port 20 was working in the past and is now blocked. Don’t the recent core-updates have something like another firewall-rules implemenation which could explain this ? Could it be Squid-related (I don’t see that anymore in the gui) ?

WinSCP can also be used into batch file, man :wink: And supports PASV and active FTP.

Try creating a rule as follows:
source standard networks RED, destination standard networks GREEN,
protocol preset services ftp-data, accept, save, enable rule

test your ftp program again …

Hi Pike, been using WinSCP for years and never tried it in batch. Thanks for the tip. The upload is working now.

Thanks

Hi Pavlos, I created the rule and tested ftp.exe with it, but the problem is the same

Depite I’m able to upload now with WinSCP, I still would like to know how to solve the problem with ftp.exe.

Thanks