Port forwarding through SSH/Putty

I often exchange data between work and home. This can be anything, from local websites that i develop at home or filetransfers that i dont want anybody to know about ;-).

To maintain security i have a firewall at both my office and at home so i needed to find a way without creating specific rules for it. For example my webserver at home; it’s behond a virtual Vyatta router/firewall since i dont want anybody to access it.

On any *nix system or mac you can use the openssh packages that are usually already in place. on Windows you should download Putty.

Access to my web development server at home
On my PC (i use Mac OSX) i can open up a port (8080) to access my webserver at home (using port 80):

[code]ssh -L 8080:localhost:80[/code]

This creates a tunnel from port 8080 on my Mac to port 80 on my home server and we can now see the result by opening Safari and pointing it to: http://localhost:8080

Using a off-site Proxyserver
I often want to use a proxyserver that’s hosted elsewere. So i want my Mac (at my office) to use the Proxyserver (let’s say at my home) without anybody noticing.

[code]ssh -L 3128:localhost:3128[/code]

I’ve now mapped port 3128 from my local PC to the one at my home. Now i can point my browser to use this proxy and browse the web without anybody noticing 🙂


Geef een reactie

%d bloggers liken dit: