FTP over TLS connection to remote server works from FileZilla but doesn't work from WinSCP

Advertisement

ravens
Joined:
Posts:
2

FTP over TLS connection to remote server works from FileZilla but doesn't work from WinSCP

I need to connect to a client's FTP server. The connection should be FTPS (explicit FTP over TLS) with port 21. This works from FileZilla, but it doesn't work with WinSCP.
I have attached the log files for both.
Can anyone please help me resolve this?
  • winscp.log (5.83 KB, Private file)
  • filezilla.log (3.05 KB, Private file)

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
42,328
Location:
Prague, Czechia

Re: FTP over TLS connection to remote server works from FileZilla but doesn't work from WinSCP

Your FTP server is misconfigured to return an invalid IP address 0.0.0.0 in PASV command response.
Both WinSCP and FileZilla, when encountering an invalid address they ignore it and open the data connection to the original address of the server. But WinSCP does not identify 0.0.0.0 as an invalid address, so it won't employ the workaround.
Though note that this is only a workaround, the fault is still on the server's side.
You can make WinSCP to ignore the address unconditionally using session option Force IP address for passive mode connections:
https://winscp.net/eng/docs/ui_login_ftp

I'll improve WinSCP to recognize IP addresses starting with a zero as invalid:
Issue 2224 – Recognize IP addresses starting with zero in FTP PASV response as unroutable

Reply with quote

ravens

Thank you so much!
I will report this to the client if they may want to re-configure it on their end. But using the setting to force IP did work both on WinSCP GUI and .NET app where I use this. That resolves issue on my end.

Reply with quote

Sw33tKickz
Joined:
Posts:
1

Re: FTP over TLS connection to remote server works from FileZilla but doesn't work from WinSCP

I came across this post after finding it necessary to set "Force IP address for passive mode connections" to "On" when connecting to my Bambu Lab 3D printer via implicit FTPS.

This occurs as the FTPS service on the device returns "0.0.0.0" for its IP address (I have no way to change this). My interpretation of the linked to issue/commit is that the default setting value of "Auto", when encountering an unroutable IP, should automatically force the use of the host address used during the initial client connection. While running the latest WinSCP Version 6.5.3 that doesn't seem to be the case.

Please see the attached logs (sanitized for privacy). Thanks.
Description: Successful login attempt with "Force IP address for passive mode connections" to "On"
Description: Failed login attempt with "Force IP address for passive mode connections" to "Auto"

Reply with quote

Advertisement

martin
Site Admin
martin avatar

Re: FTP over TLS connection to remote server works from FileZilla but doesn't work from WinSCP

@Sw33tKickz: The detection fails in your scenario, as while the PASV address is indeed unroutable, the actual FTP server addresses is considered unroutable too, as it is a local network address (192.168...).

Reply with quote

Advertisement

You can post new topics in this forum