0

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 :)

3 Answers 3

2

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
4
  • 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... ! May 12, 2011 at 10:39
  • In your firefox, the IP address should be localhost or 127.0.0.1
    – slubman
    May 12, 2011 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)) May 13, 2011 at 5:31
  • It's not the same, the ssh process only bind to localhost, not to all interfaces.
    – slubman
    May 13, 2011 at 7:49
1

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

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.

1
  • 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 :) May 12, 2011 at 10:46
0

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .