Thursday Mar 19, 2009

LAN behind proxy servers

Many colleges have Local Area Networks that are behind a proxy server. And the proxy server filters some ports, websites etc. Sometimes there are DNS resolution issues. For instance, we want to login via ssh to a free shell account on some server on the internet. Or we want to connect to some repository for downloading software, or join some P2P network for file sharing (there are many other such instances where I faced problems). When we try to conect to the server, the software we are using is not able to resolve the IP, or something is filtered by the proxy server, and we are at a loss how to get our work done.


This is where 'proxychains' come to the rescue. Proxychains is a very cool open source software. It allows us to run any program (including servers) from behind a proxy. Some of the interesting features (from the proxychains page in sourceforge) are:


     * Allows TCP and DNS tunneling through proxies.
     * Supports HTTP, SOCKS4 and SOCKS5 proxy servers.
     * Different proxy types can be mixed in the same chain.
     * Proxy chain: user-defined list of proxies chained together.
     * Run any program (including servers) from behind a proxy server.
     * Access the Internet from behind a restrictive firewall.
     * Source IP masquerade.
     * SSH tunneling through proxy servers.
     * Access Intranets from outside.


It's pretty useful. It's simple to install
# ./configure
# make
# make install
and configure
# vim /etc/proxychains.conf
by editing the chain policy, and specifying the proxy server URL, port and username and password (if any).
Using it is very simple
# proxychains <any_application_you_want_to_run>
e.g.
# proxychains deluge
# proxychains ssh some.ssh.server.org  -l  kraesen
# proxychains pkgadd -d http://install/something.pkg
# proxyresolve sun.com
Hope you will find this little information useful. Any comments, questions, feel free and fire them at me.


Sun Tech Days, Hyderabad

This is the first entry in my weblog. It feels great, while at the same time brings to my mind all kinds of  "What-if's". What if no one cares to read my blog? What if I can't find enough interesting material to blog about? And so on and so forth... Let's see. Take the first step. The rest will take care of itself.


Recently I have been to Hyderabad to attend Sun Tech Days, a worldwide developer conference. It was a thrilling experience. It opened my eyes. There are a lot of interesting things going on around. It's hard to keep up with all these, but believe me, it's fun and rewarding trying to. I met so many wonderful people who are so excited about new and emerging technologies. The Hyderabad International Convention Centre was like a very rich technological ecosystem. Everyone exchanged new ideas, thoughts, laughter and friendship. It felt so good, so alive. Everyone spoke the same language - Java, talked about ZFS - the filesystem of the future, and played with OpenSolaris.


James Gosling, the creator of Java, [commenting on the Sun Tech Days 'man with paint & brush' picture] - he was overly modest and claimed to be just a "chemist" who created the paint, and said we, the developers, were the creators of everything else, the imaginative geeks who drew masterpieces. I was really flattered by those words from the father of Java. He threw T-shirts at us. I wasn't lucky enough to get one, though.


There were many other renowned speakers and experts in many areas. I learnt about Solaris zones and containers, ZFS, a little bit about JavaFX, LWUIT and many other interesting things. Now, JavaFX reminds me of this interesting incident that happened in one of the tech talks. There was this lecture on JavaFX. I am intentionally leaving out the speaker's name here. It was going on pretty well except for this. During the course of the demonstration, the laptop was hacked and it had to be rebooted. Someone was being very naughty then. It left me thinking about the various ways the attack could have been made.


All in all, those three days were one of the best days of my life. Exciting, educative, fun and ...