Active FTP PORT command - port number
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Unix and Linux reviews > Free Unix support > Unix administration > Active FTP PORT command - port number




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Active FTP PORT command - port number  
allab@sympatico.ca


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
01-28-07 06:27 AM

Hello All,

The PORT request has a parameter in the form

h1,h2,h3,h4,p1,p2

meaning that the client is listening for connections on TCP port
p1*256+p2 at IP address h1.h2.h3.h4.

Where p1 and p2 numbers are coming from? Are there any ftp
configuration files?

Thanks,
Alona






[ Post a follow-up to this message ]



    Re: Active FTP PORT command - port number  
Barry Margolin


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
01-28-07 06:18 PM

In article <1169954472.299107.148130@v33g2000cwv.googlegroups.com>,
allab@sympatico.ca wrote:

> Hello All,
>
> The PORT request has a parameter in the form
>
>      h1,h2,h3,h4,p1,p2
>
> meaning that the client is listening for connections on TCP port
> p1*256+p2 at IP address h1.h2.h3.h4.
>
> Where p1 and p2 numbers are coming from? Are there any ftp
> configuration files?

The FTP server normally asks the stack to find an unused port number and
bind the socket to it.  It will change from connection to connection.

--
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
*** PLEASE don't copy me on replies, I'll read them in the group ***





[ Post a follow-up to this message ]



    Re: Active FTP PORT command - port number  
allab@sympatico.ca


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
01-29-07 06:33 AM

Barry,

The question was regarding PORT command in ACTIVE FTP mode.

In active mode FTP the client connects from a random unprivileged port
(N > 1023) to the FTP server's command port, port 21. Then, the client
starts listening to port N+1 and sends the FTP command PORT N+1 to the
FTP server. The server will then connect back to the client's
specified data port from its local data port, which is port 20.

Where does the number of  a random unprivileged port come from?

Thanks,
Alona

On Jan 28, 9:42 am, Barry Margolin <bar...@alum.mit.edu> wrote:
> In article <1169954472.299107.148...@v33g2000cwv.googlegroups.com>,
>
>  a...@sympatico.ca wrote: 
> 
> 
> 
> 
> bind the socket to it.  It will change from connection to connection.
>
> --
> Barry Margolin, bar...@alum.mit.edu
> Arlington, MA
> *** PLEASE post questions in newsgroups, not directly to me ***
> *** PLEASE don't copy me on replies, I'll read them in the group ***






[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 11:25 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register