i develop several scripts which get their data from ftp-servers. My machine is behind a proxy which prevents my scripts (and programs like ftp) to connect to my testserver.

Testing with a windows ftpclient the proxy can be accessed using the SOCKS5 protocol. How can i emulate this on the system layer of my ubuntu 11.10?

Using system settings -> network proxy solved my problem for http and https connections but using the right ip:port combination for ftp does not allow me to connect to my testservers. I suspect that is need to define the protocol but have no clue where or how to do it.

Regards,

kasten

link|improve this question
feedback

1 Answer

up vote 0 down vote accepted

you will need to add environment variables in bash so that clients like wget can use ftp over the proxy

 export FTP_PROXY='http://192.168.0.1:9000'

 export FTP_PROXY='http://username:password@192.168.0.1:9000'

what client are you using in your script?

link|improve this answer
Thanks for your help. I write perlscripts and don't want to add proxyconfiguration to them. I only develop them behind an proxy. ftp_proxy='http://<ip>:<port>' is set but does not work. I try to test with the ftp commandlinetool and my perl script. The proxy does not need username/pw. – kasten Jan 16 at 10:02
are you calling wget or curl from perl scripts for getting/putting files over ftp or using perl ftp module? – daya Jan 16 at 10:03
I use the perl ftp module. But i really try to get the system to use the ftp-proxy and not to install it for each program. – kasten Jan 16 at 10:06
in that case you might want to try this first, configure proxy using Ubuntu GUI and check that the files are accessible over ftp from a web-browser. – daya Jan 16 at 10:15
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.