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 used to use follows as my proxy server

 start c:\ssh\plink.exe -N username@mysite.com -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

3 Answers 3

up vote 6 down vote accepted
+50

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

On your machine, do:

plink -L 1234:mysite.com:22 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 mysite.com 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 mysite.com and end up talking to the ssh server there, so your proxy will behave like normal.

share|improve this answer

is mysite.com 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 username@mysite.com -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
    
www.serverpronto.com –  James Watt Oct 13 '10 at 7:44

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.