Uploaded image for project: 'YADE - Managed File Transfer'
  1. YADE - Managed File Transfer
  2. YADE-665

FTP/FTPS - Prefer EPSV over PASV for passive data connections

    XMLWordPrintable

Details

    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.
      • 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.

      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)
        • 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.
      • Expected Result:
        • FTP/FTPS connections work successfully with both IPv4 and IPv6.

      Attachments

        Issue Links

          Activity

            People

              re Robert Ehrlich
              re Robert Ehrlich
              Rajrani Upadhyay Rajrani Upadhyay
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: