Firewall – FTP notes

Every now and then there is a need to unblock ftp traffic on a firewall.This post reminds which tcp ports are used by FTP in active and passive mode. Note – the ephemeral port is a random port > 1023.

Active mode

Step 1: Client initiates connection from ephemeral port to server port 21.
Step 2: Server initiates connection from port 20 to the client ephemeral port (the client specified earlier)

Passive mode

Step 1: Client initiates connection from ephemeral port to server port 21
Step 2: Client initiates connection from ephemeral to the server ephemeral port (the server specified earlier)

Sources

You can find more detailed explanation at this link: http://slacksite.com/other/ftp.html

Leave a Reply

Your email address will not be published. Required fields are marked *