Monday, December 26, 2005

My little proxy...

I work in the Maths department at a large university. Like a lot of universities, the IT department seems to think its primary mission is to prevent everyone else getting on with their job, or so it seems sometimes!

One thing IT did a while back that did have a very positive impact on my quality of life was to implement a web proxy cache, which could be used off campus to access academic journals and databases the university subscribed too. With this together with broadband at home I could work effectively from home (or anywhere else) looking up papers easily. Well it was too much to expect that something so useful could continue for long. They replaced it with a Virtual Private Network. Unfortunately they chose a proprietary one that does not work the the linux implementation on my laptop. Also while you can change the proxy settings on other peoples computers you cant go around installing a VPN client as easily.

Anyway my solution was to start squid on my desktop computer (an old machine running Redhat 7.x) and then using ssh tunneling to connect my laptop to the desktop ussing ssh tunnelling.

Here is the script I use:

#!/bin/sh
rxvt -geometry 40x10-0-0 -title "squid tunnel" -bg black -fg yellow -fn 6x9 -e "ssh bill@mydesktop -p 80 -L 31
28:localhost:3128" &

It puts a little black and green terminal window up in case I want to check its still running. Usually I minimize it. I then change the settings in konqueror (settings->Proxy Manually specify proxy connection, Setup, localhost 3128.

Quality of life restored!