CrushMFT Documentation

Template: FTP with passive ranges#

FTP needs more than one port: the control port (21), and a passive port for every transfer and directory listing. CrushMFT tells the client which passive port to use, so each CrushMFT server gets its own range of passive ports, and the balancer forwards each range to its server. This wizard sets all of that up, for FTP, explicit FTPS and implicit FTPS.

Listeners › Add listener › FTP with passive ranges:

The FTP wizard

Preview shows the listeners it will create: one for the control port, and one passive range for each server.

The listeners the wizard will create

Create listeners saves them and shows what to set in CrushMFT on each server, with your numbers. Copy checklist copies it.

The CrushMFT checklist

The details#

The wizard creates one control listener plus one passive range listener per backend, all tcp:

  • inputs: FTP (explicit FTPS passes through) or implicit FTPS, the control port (required; 21 or 990 is suggested, any port can be typed), bind address, backends (1–32, one per line as host or host:port; a line without a port uses the control port), passive base port (40000) and ports per backend (100; 10–1000), and "Send PROXY v1" (checked);
  • for backend i (counting from 0) the range is A-B with A = base + i × ports, B = A + ports − 1, and the passive endpoint points at that backend's port A (the port numbers must be the same on both sides, because CrushMFT announces its own port numbers);
  • the passive listeners have no health probe, because a probe would take a passive port;
  • Create listeners saves them, then the wizard shows the CrushMFT checklist.

CrushMFT checklist (per backend; the wizard prints it with your numbers, without the server_ip, presend and SNI details):

  • the FTP port's pasv_ports = that backend's range A–B;
  • the passive address CrushMFT announces must be the balancer's public address: set the FTP port's server_ip to a host name that resolves to the balancer's public address, or rely on clients using EPSV (which carries no address);
  • exactly one of proxy_header (v1) or proxy_header_v2 (v2) on the FTP port, matching the endpoints' PROXY version. Never both: CrushMFT would then read v2 on the control connection but v1 on passive data;
  • global proxy_protocol_ftp_pasv=true, so the passive data connections read the PROXY header too;
  • deny_fxp on (the default), presend off (ftp_loadbalancer_header_presend=false, the default), and SNI off on ports that receive PROXY;
  • firewall the FTP port and the passive range so that only the balancer can reach them.

Notes:

  • Range sizing. Each passive port takes exactly one data connection. Size each backend's range to at least twice its peak number of concurrent passive transfers (at most 10,000 ports per listener).
  • Draining a backend. Set its control endpoint to draining (new logins go elsewhere, connected clients continue), and keep its passive endpoint enabled until those sessions have ended: a range endpoint is used unless it is disabled.
  • Shared ranges are discouraged. One range listener with several endpoints (warning SHARED_PASSIVE_RANGE) needs the same pasv_ports on every backend and routes each data connection by the client's address pin from the control listener; a data connection from another address can reach another user's passive port and fail that user's transfer. One range per backend cannot fail this way.
  • NAT-pool clients (control and data from different public addresses) fail against CrushMFT's deny_fxp, with or without a balancer.
  • Active mode (PORT, EPRT) data goes directly from CrushMFT to the client, not through the balancer.