Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

share|improve this question

1 Answer 1

up vote 2 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?

share|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 '12 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 '12 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 '12 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 '12 at 10:15

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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