Firewall – FTP notes
July 27, 2016
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.
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)
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)
You can find more detailed explanation at this link: http://slacksite.com/other/ftp.html