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 have been trying to connect to the Web through an ssh tunnel but without success...

Mi test is pretty simple : I've got two computers behind my router(with the internet access).

  • Computer 1 : 192.168.1.32 (ssh client)
  • computer 2 : 192.168.1.9 (ssh server)

computer 1 : runs ssh -v -ND 2080 pi@192.168.1.9

socks tunnel opens with verbose result :

debug1: Authentication succeeded (password).
debug1: Local connections to LOCALHOST:2080 forwarded to remote address socks:0
debug1: Local forwarding listening on ::1 port 2080.
debug1: channel 0: new [port listener]
debug1: Local forwarding listening on 127.0.0.1 port 2080.
debug1: channel 1: new [port listener]
debug1: Requesting no-more-sessions@openssh.com
debug1: Entering interactive session.

I try the tunnel with firefox configured with :

"Manual proxy configuration" HTTP Proxy : 127.0.0.1; port : 2080; SOCKSv5

Then I try to surf the web
The browser fails to retrieve web content and displays :

 - The site could be temporarily unavailable or too busy. Try again in a few
    moments.
 - If you are unable to load any pages, check your computer's network
    connection.
 - If your computer or network is protected by a firewall or proxy, make sure
    that Firefox is permitted to access the Web.

On every web request the verbose ssh tunnel prints to stdout :

debug1: Connection to port 2080 forwarding to socks port 0 requested.
debug1: channel 2: new [dynamic-tcpip]
debug1: channel 2: free: dynamic-tcpip, nchannels 3

Is SSH supposed to forward the requests to the web or am I supposed to install some kind of proxy on coñputer 2 e.g. SQUID ?

Thanks a lot for helping me with this issue :)

share|improve this question
1  
To answer the last question, no, you should not need a "second" proxy like Squid, SSH is all that should be required. –  davidgo Mar 6 '13 at 19:25
    
Thanks @davidgo for your rapid reply. I deduce my computer2 (ssh server) is misconfigured. Do you kwow if a fresh ssh-server install needs some additionnal tweaking to manage web-proxying ? –  Dom Mar 6 '13 at 22:21
    
I can't see that being the case (at least I've never come across it, and I've managed servers through and with SSH for as long as I can recall). Its unlikely your ssh server is misconfigured - more likely a problem with your browser. I know when I had need to do something similar recently I could not get it to work with Firefox, I landed up using Google Chrome and specifying the proxy info on the command line (I use Linux, so Chrome did not support doing it in the GUI). Maybe you could do a TCPDump while trying to get the page and see what is happening with SSH traffic to provide a clue ? –  davidgo Mar 7 '13 at 0:32
    
@davidgo I finally got it working ! :) You were right it was a browser problem ! I launched 'chromium-browser --proxy-server=socks5://localhost:2080' on computer 1 and 'sudo tcpdump -i eth0 -nvv port 8' on computer 2 and it worked ! My failure was in the conf of firefox I found help here : superuser.com/questions/417397/… Thanks for guiding me to the solution ! –  Dom Mar 8 '13 at 18:02

1 Answer 1

Resolved My failure was in the conf of firefox good configuration can be found here : How to tunnel HTTP over SSH via SOCKS?

share|improve this answer

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.