Details
-
Feature
-
Status: Released (View Workflow)
-
Minor
-
Resolution: Fixed
-
2.0.0
-
None
Description
Current Situation
- For FTP passive mode:
- The control connection currently sends PASV exclusively.
- PASV requests the server to open a passive data port and return both the server IP address and port to the client.
- This is an IPv4-specific mechanism.
- The actual data connection is then established using the address returned by the server.
- Apache Commons Net handles the data connection itself and generally uses the appropriate mechanism where supported.
- The control connection currently sends PASV exclusively.
- Consequences
- Using PASV exclusively creates problems in environments where the server or the network path uses IPv6.
- The client cannot reliably control whether the address returned by the server is IPv4.
- For example, the hostname used for the connection may resolve to an IPv6 address, or a proxy may resolve the destination and return/use an IPv6 address.
- This can result in an address-family mismatch and subsequently cause connection failures or exceptions.
- EPSV does not return an IP address.
- It only returns the passive port, allowing the existing connection target to determine the address family.
- This makes EPSV suitable for both IPv4 and IPv6.
- Using PASV exclusively creates problems in environments where the server or the network path uses IPv6.
Desired Behaviour
- Prefer EPSV over PASV for passive FTP/FTPS connections, including IPv4.
- Fall back to PASV if EPSV is not supported by the server.
Test Instructions
- Test FTP/FTPS using the default Docker FTPS containers, which are typically configured to use IPv4 only.
- Test against an FTP/FTPS server that supports IPv6, e.g. a locally installed FileZilla Server.
- Make sure that the FileZilla Server is configured to accept IPv6 connections:
- Open FileZilla Server Administration.
- Go to Server - Configure - Server Listeners.
- Make sure the following listeners are configured:
- :: 21 Explicit FTP over TLS and insecure plain FTP
- :: 990 Implicit FTP over TLS (deprecated)
- Make sure the following listeners are configured:
- Configure the test to use the server's IPv6 address instead of its hostname.
- Use ipconfig to determine the server's IPv6 address.
- Verify in the FileZilla Server interface/log that the connection was received over IPv6 and processed successfully.
- Make sure that the FileZilla Server is configured to accept IPv6 connections:
- Expected Result:
- FTP/FTPS connections work successfully with both IPv4 and IPv6.
Attachments
Issue Links
- is related to
-
YADE-663 FTP(S) transfer - preserve destination hostname for SOCKS proxy connections
-
- Released
-