Connect to a proxy through a middle host with a ssh tunnel
Hi everyone,
I've tried to exploit this thing the whole morning, but I couldn't find a way out. Let me explain my situation: my university gives to student a proxy access to the university network to let them look for science articles and so on on the net and download them without paying because the university already has contracts with them. The problem is that the dorm I'm in has a firewall which doesn't let me connect to the proxy and the sysadmins already said that they won't open that port. Fortunatly enough, I have ssh access on a server where I keep my personal website and so on, so I was thinking to use this opportunity (since I can do ssh from my dorm) to access the proxy. What I have in mind is this: "my laptop" == ssh tunnel ==> "hosting server" == connect ==> "proxy server" In this way I should be able to reach the proxy from within my dorm. Surfing the net I've found the program connect and this piece of information: http://bent.latency.net/bent/git/got...ect.html#sec21 So, first of all I've tried to ssh into my hosting server and launched the connect command from there with Code:
connect -p 3128 proxy.unito.it 3128 Code:
ssh -f user@hosting-server -L 3128:localhost:3128 -N Trying to keep things simple, I've also tried the command suggested on the link above, and from my shell I run: Code:
ssh user@hosting-server connect proxy.unito.it 3128 Code:
bash: connect: command not found So, do you have any suggestion on how I can make this thing work? It doesn't need to be a ssh tunnel or whatever, I just want access to the proxy. |
I don't follow the logic of using the connect command. in your ssh command you're connecting to that socket that connect created, right? Well don't do that, just tell ssh to connect directly to the proxy, it's simpler than you think.
Code:
ssh user@hosting-server -L 3128:proxy.unito.it:3128 |
Just for the sake of being 100% sure everything will be understood:
1) The tunnel acid_kewpie mentions must remain open. If for any reason you close the connection, you just have to open it again. 2) You have to tell your web clients to use http://localhost:3128 as proxy |
It works like a charm, thank you very much. I'm still trying to grasp the full basics of ssh tunneling.
|
All times are GMT -5. The time now is 04:45 AM. |