FTP Error: 500 Invalid PORT Command

This article was previously published under Q281193
This article has been archived. It is offered "as is" and will no longer be updated.
When you try to use Ftp.exe, or some other File Transfer Protocol (FTP) utility, you may receive the following error message:
500 Invalid PORT Command
After a client initiates an FTP session, the server establishes a new back connection to the client. This connection extends from the server (outside the firewall boundaries) to a dynamically allocated port number on the client computer. Because the port number is not known in advance, old packet filters open the entire range of high-numbered ports (greater than 1023) for incoming connections. This reconnection at a higher port is done with the following FTP command:
port h1, h2, h3, h4, p1, p2
The values of h1 through h4 are octets of the client IP address. The last two values of p1, and p2 are used to determine the port. The following formula is for p1, and p2:
p1 X 256 + p2 = port
If the Firewall Network Address Translation (NAT) does not correctly change this IP address (h1 through h4), the server generates the error message (noted in the "Symptoms" section of this article) on the command.

This problem is more likely to manifest when the FTP server changes from listening on port 21 to another, higher port.
The following sample command is an example of a port command:
port 10,20,30,40,5,25 = (IP Address: / Port: 1305)

Article ID: 281193 - Last Review: 12/05/2015 23:00:26 - Revision: 1.2

Microsoft Windows 2000 Server, Microsoft Windows NT Server 4.0 Standard Edition

  • kbnosurvey kbarchive kbenv kberrmsg kbprb KB281193