Skip to main content

Why do FTP use two port numbers?

More
17 years 9 months ago #20126 by shreyas
Could anyone explain me why FTP uses two port numbers where as all other protocols have only one port number?
More
17 years 9 months ago #20131 by Smurf
This is how the protocol has been written (Dunno why). For some reason whoever developed the FTP protocol decided that it would use two ports to split the data and control portions. FTP Port 20 is the Control portion and FTP Port 21 is the Data portion.

Wayne Murphy
Firewall.cx Team Member
www.firewall.cx

Now working for a Security Company called Sec-1 Ltd in the UK, for any
Penetration Testing work visit www.sec-1.com or PM me for details.
More
17 years 9 months ago #20132 by Elohim
because it was a really good idea back than...
More
17 years 9 months ago #20133 by krik

This is how the protocol has been written (Dunno why). For some reason whoever developed the FTP protocol decided that it would use two ports to split the data and control portions. FTP Port 20 is the Control portion and FTP Port 21 is the Data portion.


Sorry but you're wrong about the ports it's the opposite...

FTP is an unusual service in that it utilizes two ports, a 'data' port and a 'command' port (also known as the control port). Traditionally these are port 21 for the command port and port 20 for the data port. The confusion begins however, when we find that depending on the mode, the data port is not always on port 20. Port 20 is only used by active FTP, if passive FTP is used a random port will be opened for the data transfer...

For more information, read this page :

slacksite.com/other/ftp.html

Christophe Lemaire
www.exp-networks.be/blog/
More
17 years 9 months ago #20135 by Smurf
lol, well spotted you are correct i got them the wrong way around.

That'll teach me to rush posts in the middle of studying :)

Appologies

Wayne Murphy
Firewall.cx Team Member
www.firewall.cx

Now working for a Security Company called Sec-1 Ltd in the UK, for any
Penetration Testing work visit www.sec-1.com or PM me for details.
Time to create page: 0.125 seconds