Ssh – Basic proxy with OpenSSH, Cygwin, Putty

cygwinputtysshssh-tunnel

I know this is probably a common question, but after looking around for a few hours (on this site and others), I can't find a solution.

I'm trying to set up a simple proxy. I already have a server running Windows Server 2008.

I've installed Cygwin and have OpenSSH installed. I also have sshd (the openssh daemon) running. Port 22 is forwarded correctly.

On my client side I have Putty on a Windows 7 machine. I can successfully open a connection to my server and log in to access the shell.

So what do I do next?

Do I just name the ports I want tunneled in Putty or do I need to tell my SSH server what to do with those ports?

Thanks for the help. Let me know if I left anything out.

Edit:
Ended up using the following: Link

Just wish I could get it to work with FoxyProxy.

Also, for anyone looking in the future, don't forget to forward your DNS requests also. It took me a while to figured out why blocked sites were still being blocked, even with all my traffic being tunneled through my connection.

Best Answer

You need to use the -D option to ssh. This sets up a SOCKS proxy listening on localhost connecting through the ssh server. eg

ssh -D 8080 my.host.com

Then configure FoxyProxy with a SOCKS proxy for localhost port 8080. Using FoxyProxy is incredibly useful here because it lets you use patterns to only tunnel the traffic you want to be proxied. Eg. you can access your corporate intranet web sites seamlessly but all of your other web requests go out your regular gateway (so you can safely browse your pr0n sites while working from home).