Subject: Re: ports for ftp
To: Daniel R. Killoran,Ph.D. <drkilloran@speakeasy.net>
From: David Laight <david@l8s.co.uk>
List: netbsd-help
Date: 08/01/2005 21:34:12
On Mon, Aug 01, 2005 at 11:59:03AM -0400, Daniel R. Killoran,Ph.D. wrote:
> 
> Thanks all! A little "sniffing" revealed that ftp had grabbed a port  
> in the 5100 range and insisted on using it for data transfer or  
> something like that. Odd - I thought it used port 20 for that.  
> Anyway, I have to open up that range to get ftp to work.

The ftp control connection will go from a high-numbered port [1] on your
system to port 21 on the ftp server.  The server then connects from
port 20 to an IP address and port passed in one of the control messages.
This is usually the IP address of your system and the same high-numbered
port used by the control connection.
It is, of course, possible to send the data to a third system.

	David

[1] Typically chosen by the TCP stack during connect()

-- 
David Laight: david@l8s.co.uk