Categories
FTP

Calculate Passive FTP Data Port

ftp data port
When communicating over FTP, two ports are used, one for commands and the other for data.

Here’s how to calculate the ftp data port:

227 Entering Passive Mode (10,10,1,11,19,15)

10,10,1,11 is the server’s TCP/IP address.

19,15 is the port that the server is telling the client to use during the data transfer. To calculate this port, use the formula: (first value x 256) + second value.

This example has a value of (19 x 256) + 15 = 4879.

So the data port for this FTP connection will be port number4879.

See also: RFC 959 – File Transfer Protocol