Can't upload to FTP server through SOCKS proxy

07
2013-09
  • Ben Jacobson

    This question is somewhat of an extension of this question.

    My final intention is to be able to upload files to the ftp server in question.

    I have FileZilla connecting through a SOCKS proxy created by PuTTY on port 9090 in order to mask my IP address so that I may connect to my work FTP server which will only accept connections from local IP's. PuTTY is ssh'ing to a machine at my work and FileZilla is set to use the local proxy (located at 127.0.0.1:9090) to connect to my work FTP server.

    This works successfully, as I am able to connect, get directory listings, download files, and perform several file actions (I've renamed a file, moved a file, deleted a file..etc). However, I am unable to UPLOAD anything. The log appears to show everything going fine then the connection simply times out and the transfer fails.

    Note* The server generally (though not always) creates the file I am intending to upload with no data inside it. The personnel.html file I show trying to upload below was created on the server, however FileZilla shows it as having a size of 0B and when I download (or view it online) it is completely blank.

    Below I have included the log of FileZilla attempting to upload personnel.html to the FTP server. I have obscured any personally identifiable information.

    Status: Connecting to xxx.xxx.10.2 through proxy

    Status: Connecting to 127.0.0.1:9090...

    Status: Connection with proxy established, performing handshake...

    Status: Connection established, waiting for welcome message...

    Response: 220 BulletProof FTP Server ready ...

    Command: USER xxxx

    Response: 331 Password required for xxxx.

    Command: PASS **

    Response: 230 User xxxx logged in.

    Status: Connected

    Status: Starting upload of C:\Users\xxx\Desktop\prrc\personnel.html

    Command: CWD /research_groups/reservoir_sweep_improvement/pages

    Response: 250 CWD command successful. "/research_groups/reservoir_sweep_improvement/pages" is current directory.

    Status: Retrieving directory listing...

    Command: TYPE I

    Response: 200 Type set to I.

    Command: PASV

    Response: 227 Entering Passive Mode (xxx,xxx,10,2,128,175)

    Command: LIST

    Status: Connecting to 127.0.0.1:9090...

    Status: Connection with proxy established, performing handshake...

    Response: 150 Data connection accepted from xxx.xxx.2.218:39774; transfer starting.

    Response: 226 Transfer ok

    Command: TYPE A

    Response: 200 Type set to A.

    Command: PASV

    Response: 227 Entering Passive Mode (xxx,xxx,10,2,206,73)

    Command: STOR personnel.html

    Status: Connecting to 127.0.0.1:9090...

    Status: Connection with proxy established, performing handshake...

    Response: 150 Data connection accepted from xxx.xxx.2.218:58526; transfer starting for personnel.html.

    Error: Connection timed out

    Error: File transfer failed

    Thanks for any help in advance!!

  • Answers
    Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

    Related Question

    ftp - On demand upload server
  • stimms

    I'm looking for a simple application which will do something like

    Allow user to sign up for an ftp account -> ask admin for approval -> create ftp account for that user
    

    now it doesn't have to be FTP, in fact I would be happy with a web based tool which supported upload via some sort of java applet or something similar. I don't care about what platform it runs on, although if we could avoid PHP that would be cool. Any ideas?


  • Related Answers
  • William Hilsum

    What platform? Without this, I am just giving some general advice.

    This is easy to achieve and I have just made something similar for my company but it depends on a number of things and will usually require a bit of scripting.

    The easiest way is to find a FTP server that supports a database for user membership, then all you need to do is create a small website in the language of your choice and simply take username and password along with anything else you want. You can then set that script to send you a email with all the details or simply have it display on another (admin) webpage, and a delete or confirm button.

    When you press delete, it deletes the entry (of course!) and when you click confirm, it can enter the details in to the database of the FTP server.

    You can also use a FTP server that has membership in any form (such as XML files or windows / unix accounts) but having one that has a database backend is so much simpler.

    Also, You could have all users in one database, if they are confirmed or not, but I said the above just for simplicity as you probably do not want thousands of unconfirmed / disabled ftp users.

  • alpha1

    if its openBSD you might look at hosting a file FTP site using Freenas. Freenas can be used as a webserver now, so you could do it.