Results 1 to 4 of 4

Thread: Internet Transfer Control & Passive Mode

Hybrid View

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Dec 2001
    Location
    Belgium
    Posts
    25

    Internet Transfer Control & Passive Mode

    Hi,

    I have a question i've made a little ftp client with the ITC but problem is i'm behind a firewall(NAT) and i want to turn off the Passive Mode. Is this possible?

    Regards
    Wizzard

  2. #2
    Hyperactive Member
    Join Date
    Apr 2002
    Location
    uk
    Posts
    327
    I think its as simple as executing a PASV command, possibly before each transfer. Read this:
    http://www.faqs.org/rfcs/rfc1579.html

    And here's some extracts from the FTP RFC (you should read that as well)
    Code:
    When data is to be transferred between two servers, A and B (refer
          to Figure 2), the user-PI, C, sets up control connections with
          both server-PI's.  One of the servers, say A, is then sent a PASV
          command telling him to "listen" on his data port rather than
          initiate a connection when he receives a transfer service command.
          When the user-PI receives an acknowledgment to the PASV command,
          which includes the identity of the host and port being listened
          on, the user-PI then sends A's port, a, to B in a PORT command; a
          reply is returned.  The user-PI may then send the corresponding
          service commands to A and B.  Server B initiates the connection
          and the transfer proceeds.  The command-reply sequence is listed
          below where the messages are vertically synchronous but
          horizontally asynchronous:
    
    User-PI - Server A                User-PI - Server B
             ------------------                ------------------
             
             C->A : Connect                    C->B : Connect
             C->A : PASV
             A->C : 227 Entering Passive Mode. A1,A2,A3,A4,a1,a2
                                               C->B : PORT A1,A2,A3,A4,a1,a2
                                               B->C : 200 Okay
             C->A : STOR                       C->B : RETR
                        B->A : Connect to HOST-A, PORT-a

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Dec 2001
    Location
    Belgium
    Posts
    25
    Hi,

    I've tried this on the itc control but it doesn't works maybe i'm doing something wrong.
    Can you give me an example how i can do this?

    Regards
    Wizzard

  4. #4
    Hyperactive Member
    Join Date
    Apr 2002
    Location
    uk
    Posts
    327
    Well, since I've never done it before, I can't really no. Also, I wouldn't know if you'd tried it or not. How about you post what you've tried, what errors you're getting etc.....

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width