Re: FTP data connection

From: Barry Margolin (barmar_at_alum.mit.edu)
Date: 04/29/04


Date: Wed, 28 Apr 2004 21:19:46 -0400

In article <c6p0e4$a3i$1@nntp.webmaster.com>,
 "David Schwartz" <davids@webmaster.com> wrote:

> "Christian" <cgregoir99@yahoo.com> wrote in message
> news:c6olu0$pan$1@reader1.imaginet.fr...
>
> > When ftp'ing to a host, in active mode, the FTP server then connects back
> > to
> > the client using the TCP port 20 to send the data, no matter how many
> > connections are opened. Each one sees data coming from port 20.
> >
> > How is it performed programmatically ? I'm writing a FTP server, and i
> > can't
> > figure out how to connect to the client, given the port it sent me, using
> > always the same port.
>
> I'm not sure I understand what you think the problem is. Every TCP
> connection has a source port and a destination port. Usually, the
> destination port is selected based upon the service you want to connect to.
> The source port is usually random and it usually doesn't matter what it is.
> Just connect to the port you're supposed to connect to.

But that's not how the FTP protocol is specified. It says that the
source port of the data connection must be 20, and the destination is
the port the client specified.

-- 
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***


Relevant Pages

  • RE: L2TP + NAT-T
    ... "I'm using L2TP/IPSec since PPTP does not work through NAT. ... > Destination Port 0 ... > IKE Source Port 500 ... > IKE Destination Port 6159 ...
    (microsoft.public.win2000.ras_routing)
  • RE: blocking IPs for FTP server
    ... With Port Sentry you can use the Advanced Stealth Scan Detection. ... blocking IPs for FTP server ... holding too many open connections. ...
    (Security-Basics)
  • RE: Hidden windows ports, files and services.
    ... also apply for IE's cache. ... be the work of a root kit of some sort. ... and I'd like to analyze the ftp server. ... |was by doing an nmap port scan of the system. ...
    (Security-Basics)
  • Re: Hidden windows ports, files and services.
    ... and I'd like to analyze the ftp server. ... Prior to XP SP2, I used to be able to go through the c$ share and see ... was by doing an nmap port scan of the system. ... downloaded fresh version of each and tried again. ...
    (Security-Basics)
  • Re: Ports necessary for running a FTP-server?
    ... The FTP server should be listening on the LAN IP address of the Winroute ... The port mapping should redirect FTP traffic to the Winroute LAN ... >> install will not allow an Internet client to connect to a Winroute ...
    (comp.security.firewalls)