Take the 2-minute tour ×

I'm trying to set up an SSH tunnel as a web proxy for use when I'm at public locations. I already have a remote server to use, and I've also had this working in the past using this same server. However now when I try it, I successfully make the SSH connection, but the webbrowser returns no data for each page I visit.

The SSH command I'm using is:

ssh -ND 8080 -p 20000 myusername@myserver.com

This connects properly. If I don't include the -N, then I correctly see a remote shell, so the connection is successful.

However, when I set my browser to use the local proxy - each page returns no HTML data. It also doesn't return any errors. Literally just a blank page. Note that if I disconnect the SSH connection - then the browser shows a proxy error. So the browser is definitely doing something with the proxy.

If I try this is Chrome, then I get a chrome error explicitly saying "no data returned". If I try this in Firefox, then I just get a blank page.

Note that I'm only trying this from one public location. I'm on holiday at the moment, and am using the apartment's wifi connection. So I guess it's possible that it's something to do with their setup. However, given that I can successfully SSH to my server - I'm not sure what in their configuration could make a difference. Note that I've also tried including the DNS lookups through the proxy.

share|improve this question

4 Answers 4

up vote 4 down vote accepted

-D option allocates a socket to listen on port 8080. So, make sure that you enter the proxy info into SOCKS Host, not HTTP Proxy.

share|improve this answer
I had set the option to use the proxy setting for all protocols. I presumed this would be okay, as it included the SOCKS one. I guess I was wrong! Only setting the SOCKS one now works. Thanks :) –  Dan Sep 7 '11 at 15:44

You say you've set your browser to use the proxy, but you don't say how. You are using the SOCKS proxy option of your browser, not the HTTP (or some other) proxy, right?

share|improve this answer

What are your settings? Specifically did you set the connection as a socks proxy?

For firefox it can be easier to use Foxyproxy (extension). It can make the setup more convenient.

share|improve this answer

I have an intranet in my office with a separate firewall machine, yesterday, I had been trying to setup my work firewall computer as a proxy server with an ssh login of dynamic port forwarding enabled, that is, ssh -D8080 <uname@firewall>. Every time I tried to use that localhost:8080 proxy at home with a client machine, i got the error on my chrome browser "No data returned." Today I realized that I had closed outgoing 443,80/tcp ports of the firewall machine that was preventing connections. What an idiotic situation that i had closed outgoing ports of the machine that i was trying to setup as a proxy server. Hence, I can conclude that if something that blocks the proxy machine from connecting internet you may have "No data returned" error message, by the way 53/udp was online so the issue was not resolving the names but connecting the internet.

share|improve this answer

Your Answer


