Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

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

I used to use follows as my proxy server

 start c:\ssh\plink.exe -N -pw mypasswd -P 22 -D localhost:8003

Now my company decides to block 22 port and I cannot access the 22 port of my site host directly.But there's one machine that doesn't blocked in my lan and I can use SSH to logon it.So how can I make my proxy via the unblocked machine? Thanks!

share|improve this question
up vote 6 down vote accepted

Basically, in situations like this, you probably want to ditch the SSH-based proxy and use an SSL VPN tyoe of proxy. Such a proxy makes all your traffic look like HTTPS SSL traffic, and no one's going to block port 443.

A good one to run on Linux is Adito. It's not trivial to set up, but it works very well. I would suggest installing this, making sure it's listening on port 443, and playing around with it. It helps me RDP to my home computer despite my school blocking the port.

share|improve this answer
thanks for the suggestion,i'll try that. – SpawnST Oct 13 '10 at 6:42
To go further with this, my linux server is bound to multiple IP addresses. I have opened port 443 as an extra SSH port on one of the IP addresses that Apache is not using. This allows me to open an SSH proxy by connecting via the 443 port since, as ultrasawblade said, no one is going to block 443. – James Watt Oct 13 '10 at 7:43

is a machine you control (ie, your home machine)? If so, simply run sshd (the SSH server) on port 80 or 443 (instructions vary per OS).

Then modify your line above to:

 start c:\ssh\plink.exe -N -pw mypasswd -P 443 -D localhost:8003

If you're going to use port 443, for example.

share|improve this answer
my site is deployed on Dreamhost.So it's difficult to control the port stuff. – SpawnST Oct 13 '10 at 6:44 – James Watt Oct 13 '10 at 7:44

On your machine, do:

plink -L unBlockedUser@unBlockedMachine

(decorate with passwords, actual ssh command, -N etc. to taste) This will forward connections to port 1234 of your machine to port 22 on via the un-blocked machine. Then, all you need to do to get your proxy is:

plink -D 8003 -P 1234 mysiteUser@ulocalhost

This will open an ssh connection to port 1234 on the localhost, which will then be forwarded into a tunnel going to the un-blocked machine which will send it to port 22 of and end up talking to the ssh server there, so your proxy will behave like normal.

share|improve this answer

You must log in to answer this question.

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