6

I used to use follows as my proxy server

 start c:\ssh\plink.exe -N [email protected] -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!

3 Answers 3

6
+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.

1
  • 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, 2010 at 7:43
5

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 [email protected] -pw mypasswd -P 443 -D localhost:8003

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

2
  • my site is deployed on Dreamhost.So it's difficult to control the port stuff.
    – SpawnST
    Oct 13, 2010 at 6:44
  • www.serverpronto.com
    – James Watt
    Oct 13, 2010 at 7:44
1

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.

You must log in to answer this question.

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