Proxy Sharing Using SSH Tunelling

Many a times, we are working on internet behind a proxy server and have download limit that expires faster than we expect/want it to.
Students generally resort to sharing proxy passwords among themselves. While this is ok, it creates a lot of security and other problems.
Here is a way for a student to access another’s proxy without sharing the password.

Consider a scenario where personA is connected to proxy and personB wants to connect to it using personA’s connection.
Since A is logged into the proxy, http, https, ftp and socks connection to proxy-server must be available on local port.
We will consider a scenario for http_proxy of IIT Delhi.
The proxy-server’s ip is and the http_proxy is available on port 3128.  Lets call them proxy_server and http_port respectively

At A :

  1.   Connect to Proxy

At B:

  1. ssh -L $my_http_port:$proxy_server:$http_port userA@userA_IP
  2. Cool. Proxy tunnel has been setup for http.
  3. Point your firefox to use the port $my_http_port on localhost for http_proxy.

You are done.
The funda behind this is :
At B, you are mapping a localport 19000(any unused port should work) to point to’s (proxy ip) 3128 port (http) using userA@userA_IP as an intermediate.

Using multiple versions of gcc at the same time

Chances are that many programs compiled for gcc 4.6 may not work for gcc 4.7.
Hence you must keep both and at the same time make the link to gcc4.7 vary according to the situation.
You can edit your gcc file to be a shell script :

if [ -n "$GCC_SIX" ]; 
  exec /usr/bin /gcc-4.6 "$@"
  exec /usr/bin/gcc-4.7 "$@"
fiNow, whenever you find a program not working on gcc4.7 
just set an environment variable and you have switched to 

for the current execution. Notice that for a 
multi-user system, this can prove to be a life saver.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s