tags:

views:

29

answers:

1

i am using a ftp connection to send data beteen server and client.servers command port is 21 and data port is 20,i want the client port specified by user is that possible,

 Ftp:

 command : client >specificport(user defined) --> server --21
 data    : client >specificport(user defined) --> server --20
A: 

If it's an active connection then the client uses the PORT command to tell the server which port it should connect to.

PORT Syntax: PORT a1,a2,a3,a4,p1,p2

Specifies the host and port to which the server should connect for the next file transfer. This is interpreted as IP address a1.a2.a3.a4, port p1*256+p2.

ho1