File Transfer Protocol (FTP) is a standard network protocol used to copy a file from one host to another over a TCP/IP-based network. FTP is built on a client-server architecture and utilizes separate control and data connections between the client and server applications which solves the problem of different end host configurations (i.e. Operating System, file names).
The separate FTP connections are utilized on two ports:
FTP can work in two modes: active and passive mode.
Depending on the mode set, the data and the commands are transmitted on different port numbers.
The FTP client doesn't make the actual connection to the server's data port – it only tells the server what port it is listening on and the server connects back to the specified port. If there is a firewall on the client side, this would appear as an incoming connection and it could be blocked.
In MassTransit, you can use both active and passive mode connections. For the passive ones, you can configure a port range that MassTransit will use to find the random port number which will be sent to the client. If MassTransit is behind a firewall or Network Address Translation (NAT), this port range as well as a public IP Address can be specified for the public connections.