Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

FTP Proxy Set up

Status
Not open for further replies.

nine97

Programmer
Aug 3, 2001
8
US
Hello,

Does anyone know how to set up an FTP proxy.

Here is my problem:
my client machine can not directly access the server via FTP. However, my machine can ftp to an intermediate machine which, in turn, can ftp to the server. In this case, i will have to upload my files to the intermediate server, login to the intermediate server and ftp again to final server.

In order to automate the process, I want to set up a proxy on the intermediate server so that when i upload to the intermediate server, it will auto sync with the final server.

I am not sure if the FTP Proxy is the right approach.
Any suggestions are welcome! Thanks in advance.


 
Apache can proxy ftp with the right modules loaded. Read up on apache and mod_proxy.
 
I scan thru the apache mod_proxy. It doesn't seem like it allows FTP file upload.
 
thanks for all of your replies.
I have come across an easy solution (still trying to get it work). There are open source perl scripts that will just sync the local directory with remote directory. Although it is not real time, it is close if i set up a cron job to run the script every 1 min or 10min. Some of the scripts are: mirror, sitecopy and ftpsync.pl. I am trying to get ftpsync.pl working. If it does, i will post it here for anyone who is interested. Or if anyone already know how to use ftpsync, please post the command line args. Thanks!

Angus Dunn
IT Consulting
 
In case anyone is interested in ftpsync, i have got it work.
It is pretty easy.
1. Download ftpsync tarball from sourceforge.net. The main thing in the tarball is the ftpsync.pl perl script.
2. Run it in command line:
/usr/ftpsync-1.27/ftpsync.pl -ip ftpuser=<your-ftp-username> ftppasswd=<your-ftp-password> <local-directory> ftp://<ftp-server>/<remote-directory>

e.g. /usr/ftpsync-1.27/ftpsync.pl -ip ftpuser=username ftppasswd=pass . ftp://ftp.mysite.com//www
3. Set up a cron job to run the above periodically.

Hope this is helpful.

Angus Dunn
IT Consulting
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top