FTP Support

FTP Support

File Transfer Protocol (FTP)

  • Used to transfer files from one host to another over the Internet
  • Uses two Transmission Control Protocol (TCP) ports
    • Initially a connection is made to a control port
    • File transfers occur across a data port
  • An efficient way to upload media and other files to a Sitecore server
    • Requires installation of FTP server software on the Sitecore server
    • Requires installation of FTP client software on the client machine
    • Filezilla is a popular free resource for both FTP server and client software

Active Mode FTP

  • Client connects from a random port above 1023 to server's control port (TCP port 21)
  • Client sends the FTP command PORT to the server for the TCP port that is one number higher than the port the client used to establish the control connection
    • Client listens to the specified TCP port for the data connection by the server
    • The server initiates a connection to the client's specified data port from its local data port (TCP port 20)
    • The client firewall must be configured to allow an incoming data port connection from the server

FTP Server Firewall Settings for Active Mode

  • Inbound TCP port 21 from anywhere so client can make initial connection to control port
  • Inbound TCP port 20 from remote ports above 1023 for client ACKs to server's data port 
  • Outbound TCP local port 21 to remote ports above 1023 for connection to client's control port
  • Outbound TCP local port 20 to remote ports above 1023 for connection to client's data port

Passive Mode FTP

  • Resolves the issue of the server initiating the connection to the client
    • Client initiates both connections to the server
    • Client firewall does not have to be configured to allow an incoming data port connection from the server
  • Client opens two random local TCP ports above 1023 to establish an FTP connection
    • The first port connects to the server control port on port 21
    • The client then issues a PASV command to tell the server it is in passive mode
    • The server responds by opening a random data port and sends a PORT command to the client
    • The client then uses a local random port to connect to the server's data port for file transfers

FTP Server Firewall Settings for Passive Mode

  • Inbound TCP port 21 from anywhere so client can make initial connection to control port
  • Inbound TCP ports above 1023 so client can make connection to random data port specified by server
  • Outbound TCP local port 21 to remote ports above 1023 when server responds to client's control port
  • Outbound TCP local ports above 1023 to remote ports above 1023 for server ACKs to client's data port

Sources