People sometimes run into difficulty when setting up an FTP Server behind a Firewall or Router. In order to understand the potential issues, it first helps to understand the difference between Active and Passive FTP.
“FTP can be run in active or passive mode, which determines how the data connection is established. In active mode, the client sends the server the IP address and port number on which the client will listen, and the server initiates the TCP connection. In situations where the client is behind a firewall and unable to accept incoming TCP connections, passive mode may be used. In this mode the client sends a PASV command to the server and receives an IP address and port number in return. The client uses these to open the data connection to the server.”
So Passive FTP is needed when the client is connecting from behind a NAT router, but what if the server is behind a NAT router as well? Two solutions:
Links of Interest