Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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 have installed a Squid proxy outside of my private LAN. How can I make my communication secure between my PC and Squid proxy so that no one sitting on my LAN sniff my communication?

share|improve this question

You should use a ssh tunnel, (clients : openssh on tux, putty on win)

The tunnel will redirect your local port, say 3128, to your squid (so localhost:3128 on your remote machine hosting squid)

So, personally i use :

ssh -N -f -L3128:localhost:3128

-N Do not execute a remote command. This is useful for just forwarding ports (protocol version 2 only).

-f Requests ssh to go to background just before command execution.

-L : Port 3128 is tunneled to to localhost:3128

Using putty you can do the same, just follow instructions found right there :

You'll got screenshoots of each steps with explanations, you sould see :

L3128 localhost:3128 on your Tunnels window in your putty, if you have a proxy on your remote box, then just configure your browser to use a proxy at localhost:3128

Another possiblity is to use -D (Dynamic) so to have

D1080 on your Tunnels window in putty, it works like a Socks server, so configure your browser to use a socks server on localhost:1080, this one don't need to have a proxy running on the remote server, so it's my favorite !

share|improve this answer
Thanks for the comments. I have putty on my local machine (Windows XP). Now what steps shall I follow to redirect my browser traffic via putty? – user46673 Jun 24 '10 at 9:36
Just editted my message adding some response on how to use Putty – Mandark Jun 25 '10 at 12:23

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.