I know this is not a new question, but I have researched a bit and so far none of the answers I've seen gave me the answer.
I have this situation:
I´m working on a campus where the network is highly insecure (certain people are doing packet sniffing) and proxy servers are used for inteet access. I have access to a server (communication between this and the proxy does not have this problem) having mounted an sshd. Although I can not log in directly, I can use it for ssh tuel (in fact the tuel is already being used with Windows machines with personal configurations).
I need to make downloads with wget using one of the proxies that are configured to access.
I created the following configuration using my client ssh.
export sshuname=MySshUseame
export sshupass=MySshPassword
export sshrserver=MyRemoteSSHD
export proxyserver=MyProxyServer
nohup sshpass -p $sshupass ssh $sshuname@$sshrserver -N -C -L 8082:$proxyserver:3128 &
When I try to telnet proxy server responds me correctly
telnet localhost 8082
But when I use the same with wget
export http_proxy=http://localhost:8082
export https_proxy=http://localhost:8082
export ftp_proxy=http://localhost:8082
export proxy_user=MyProxyUserName
export proxy_passwd=MyProxyPassword
export dir_pref=TEST
export log_name=test
export url=http://inteet.site/path/file.tgz
wget -c -t0 --no-check-certificate --proxy-user=$proxy_user --proxy-password=$proxy_passwd --directory-prefix=$dir_pref $url
wget reports the following error
Resolving localhost (localhost)... 127.0.0.1, ::1 Coecting to localhost (localhost)|127.0.0.1|:8082... failed: Coection refused. Coecting to localhost (localhost)|::1|:8082... failed: Address family not supported by protocol.
Can anyone tell me I'm doing wrong?
Make proxy with SOCKS is not an option !!!
The local iptables on this machine is accepting coections on port 8082.
In the future, the next step would be to make for each of the Proxies coections that pass through this machine to be redirected through ssh tuel in the way I described above. This machine is the firewall for inteal network of my department and "theoretically" my inteal network has no problems.
