Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

At work, my company has lately gone crazy and has started blocking all the sites (Almost all, facebook, gtalk, picasa, hotmail, gmail etc etc).

But, I have observed that they allow any outbound SSH and I have a Linux machine @home to which I am able to SSH without any problem. So, now I am thinking of using SSH tunneling to divert my traffic via my Linux machine at home to get access to places from which I am now barred from. :)

THis is what I have done till now, 1) Have set up Squid proxy server at home and is running on port 3128 (default port). 2) Have a linux machine at office from which I can SSH to my home. 3) Set the linux_machine_at_office as proxy in my browser.

I logged into Office Linux machine and I tried to establish tunnel using the following command, but it doesn't seem to be working.

ssh username@HOME_IP_ADDRESS -L 2011:HOME_IP_ADDRESS:3128 

username => My User name on my machine @home HOME_IP_ADDRESS => Ip adrress of Linux machine @home

In firefox, I changed proxy address to Office_Linux_machine and port to 2011, but its not working.

I even I tried to telnet to office_linux_machine on port 2011, and hoped it to land me on Squid server @home, but connection is failing here too...

So I was wondering if availability of outbound Is there something wrong in my command?

Thank you :)

share|improve this question

If ssh outbound is authorized, then you can create a tunnel for your traffic.

To point an error in your current ssh command, I think a good one is:

ssh username@HOME_IP_ADDRESS -L 2011:localhost:3128

To go further, you don’t need to setup squid, indeed OpenSSH can act as a SOCKSv5 proxy server. You can try this command:

ssh username@HOME_IP_ADDRESS -D 3128
share|improve this answer
Hi, Tried this but didn't work :( What I did is this (1) on my office linux machine executed "ssh home_username@HOME_IP_ADDRESS -L 2011:localhost:3128" (2) Set Firefox proxy to point to Office_linux_machine and port = 2011. Firefox is telling => "Firefox is configured to use a proxy server that is refusing connections." And I am not able to telnet "Office_linux_machine" 2011 too :( Seriously feeling clueless... ! – Microkernel May 12 '11 at 10:39
In your firefox, the IP address should be localhost or – slubman May 12 '11 at 11:07
I set it to local linux machine ip! Is same right? (The machine on which I am running this SSH command (I am forced to use Windows on my workstation @office)) – Microkernel May 13 '11 at 5:31
It's not the same, the ssh process only bind to localhost, not to all interfaces. – slubman May 13 '11 at 7:49

The tunnel should be possible. You probably need to change the proxy server to "localhost" (

Before you go any further you really should check with management before attempting to circumvent company network security policies -- if they discover that you're breaking their rules (without authorization), which were probably put in place for security reasons, you could lose your job.

share|improve this answer
Tried it, didn't work :( PLease see my comment to slubman... And my manager knows that I SSH often home and he is cool with that :) (May be he doesn't know the implications of that, but he thinks its OK :) ) And thanks for the warning too :) – Microkernel May 12 '11 at 10:46

I found that I had to use the argument "-oUsePrivilegedPort\ yes" to get this to work. It's been years since I set it up, so I don't remember why that was required.

Also, you MUST have something listening on the remote port in order for the traffic to be passed. In my case, I have squid listening on that port. Not having something listening there is why it was refusing connections.

share|improve this answer

Your Answer


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.