Friday, June 26, 2009

Literature Gallore!

Though there is a lot I would like to share on this blog, I have a feeling that Blogs are not meant to pour yourself on nitty grity of your micro activities :D! I have been upto some work off late, notably amongst it would be working on the XMPP protocol and reading some of the Classical Literature. In the spree should be mentioned a couple of books which I have recently annhilated to my heart's content, 'The Alchemist by Paulo Coelho' and 'The Paths of Glory by Jeffrey Archer'. Let's have a miniature review of the books!

The Alchemist by Paulo Coelho


This is one state-of-art that made me believe of the capabilities of Literature! I assume that most of you have heard about the book, if not had an eye at this gleaning masterpiece. Religion has always been a dilemma for workaholics and dumbs of my kind[;)]. I have often wondered if those who boister about God, Religion, and Worship would hardly consider the importance of work and ONLY work! I was of the belief-- though not adamant --that work should always precede any other preference AS Work is Worship! But what this book has done is to successfully strike a bewildering concordance between Religion-- in forms of Omens --and ambitions! It is a manifestation of Rituals that one might consider outdated and passe, that have been converted to a substance acceptable by the contemporary society! Paulo Coelho has always been a Religious authority, but the way he has manifested himself into the recent flow of society changes, is not at all an 'ordinary' feat!

I am awestruck by the concordane the book has been able to synchronize with me, and would recommend it to all who wish to find the existence of Almighty amongst their Hectic Schedule.

Paths of Glory By Jeffrey Archer




It is said that the book is a real story, but who'll be amused to read my story ? Huh! C'mon every person on this damn world has his own tale to tell, but writting it down 'just' for the sake of it makes no sense! I hail Jeffrey Archer for the exhilarating display of gleaning bright English, sometimes makes me feel inferior to the richness of language! Indeed the intricate display of words has even kept the Dictionary on it toes! With a myriad display of plethoral diversity, I won't be bemused to see a few guys leave any hope from this book :D!

Though the screenplay has been perfect, I am afraid that the content has rahter blemished the Publication as a whole. The subtitle for the book, "THIS IS THE STORY OF A MAN WHO LOVED TWO WOMEN, AND ONE OF THEM KILLED HIM'. is pretty apt, as you would find out after reading it, but the pace is rather slow, there's no plot or anything of the like .

The story is of a man, a prodigy at mountaineering and first class Alpinist. First he climbs the walls of his college then the Alps of Europe , then the Eiffel Tower and finally set out to conquer the Leaning Lady, none other than 'Mt(Ms) Everest'. The author has impressingly described Everest as the 'Virgin still in slumber, waiting to be ripped through'.

And the other woman is-- pretty obviously --his wife Ruth, who has to muster the pain to live for months w/o him, and finally loses him in front of the more deserving candidate, Her Majesty, Her Highness -- Lady Everest!

The book has a flat paced attire though it talks of bumps and rides through the treacherous valleys and peaks, it is a bit disappointing though it promises a bit more :(!

"""Hope you got my part of story, I would love to hear from what you felt about the books."""

Sunday, June 7, 2009

BSNL Broadband FTP Connectivity!

Bsnl is the 'de-facto' standard for most Broadband using homes, specially in my area. Known for it's cool speeds, abridged connectivity and easy availability from Bsnl landline makes it a very easy and optimum option for most junta.

Recently I was fiddling with the router/modem that the Bsnl guys supply with their Connection. It was pretty interesting to note that you have the option to allow access to some ports like FTP( 21 ), Telnet( 23 ) and even port forwarding.

I dont know if people have tried this thing but I was able to make my computer visible to the internet by a mix of Port Forwarding and Opening the FTP port for access. This guide shall take you through a detour as to how you can be in touch of your Desktop PC connected via a Bsnl Router/Modem anywhere in the world ;).

Know My IP

First thing to note about Bsnl connection is that your global IP( IP of the modem ) is Dynamically assigned by the Bsnl guys. This is helpful in using a smaller range of IP's to serve to a large number of users. Suppose Bsnl serves 1000 connections, but only 500 are online at a given time. If it uses Static IP's then it has to purchase 1000 such IP's! But if it assigns them Dynamically then only 500 shall do... reducing the production cost by 50 % ;)

So in order to access your computer through any Internet m/c you need to know your IP at that given instant. Hmm, I dont know a fixed way to do this, but if ur computer remains on for a particular session... the IP cannot change during that time! You can use www.knowmyip.com for the current session IP.

Typical Results
---------------------------------------------------------------------------------------------------------
Your ip is: 59.95.178.126
Your hostname is: 59.95.178.126

---------------------------------------------------------------------------------------------------------


Hence your IP is the above value! Bsnl has two typical ranges, this is the old modem/router range.

Locally Static IP

The computer which you use to connect to internet is inside the router's network, this is called subnetting whereby a group of computers connect to a common gateway for their internet requests! You can have a good overview here, rather DO HAVE A VIEW AT THIS: http://www.portforward.com/help/portforwarding.htm

You might skip the part from Port Forwarding but the rest is essential for understanding. Your task is to assign a Staic IP to your computer. Then you need to set your computer to a Static IP by the following: http://www.portforward.com/networking/static-xp.htm

For linux do the following:

1. $/sbin/ifconfig -- Note the information corresponding to the Internet Connection
2. vim /etc/network/interfaces

In the interfaces file locate the Ethernet number corresponding to the Internet connection, if it is presently on dhcp the entry will be like:

iface eth0(1) inet dhcp

In this case change this Dynamic Allocation to Staic by:

iface eth0(1) inet static
address
netmask
gateway

And restart networking by:

$/etc/init.d/networking restart

This will give you the Static IP required for the purpose!

Open the FTP/TELNET Ports on Router

The router by default will reject all incoming information that is not a reply to some query by you. But in case you want to access the computer from a remote place you need to tell the router to allow specific port to be open for access. In my router the following page is helpful, it's a bsnl router so log in by putting this in the browser address bar:

http://192.168.1.1/

Use admin:admin as the uname:pass, if you have urself changed it earlier use that pair instead!

Following pics are for UT300R2U Modem.


As you can see that the common services are blocked in here! If you have a page similar to this try unblocking the FTP/Telnet services so as to allow access from outside! This might be just a precautionary measure so that we do not get locked from router itself!

Port Forwarding

Follow the instructions from http://www.portforward.com/english/routers/port_forwarding/routerindex.htm for your specific router! Remember we will be doing a FTP login... hence forward the port 21 for now. Also allow all ports from outside to connect to your FTP port!

Setting Up the FTP

There are many lot Operating Systems and also solutions for a FTP server, my personal choice is vsftpd which is a lighweight FTP server for Linuxes, in case of Windows, try scratching the market for an appropriate solution :).

You need to configure your FTP server according to your own needs, generally you would like to keep anonymous login DENIED so that only authorized personnel( generally only YOU ) may access the resources! I would not go into the working of FTP server as it is not a part of this scope.

Testing the FTP

For testing the FTP there are two ways, one from your own computer or a computer inside the LAN of the router/modem and other is from an external network. The better of the two is to use the external network, but then you'll have to find a patient person to give instructions :P.

From within the computer

Ftp into the local computer set for port forwarding
--------------------------------------------------------------------------------------------------------
$ftp 192.168.1.4
Connected to 192.168.1.4.
220 (vsFTPd 2.0.7)
Name (192.168.1.4:sanket): sanket
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp>
--------------------------------------------------------------------------------------------------------
This output shows that your system is accepting FTP connections from local network.
Try to retrieve files,
--------------------------------------------------------------------------------------------------------
ftp> ls
200 PORT command successful. Consider using PASV.
150 Here comes the directory listing.
drwxr-xr-x 2 1000 1000 4096 Jun 05 06:08 Desktop
<...>
drwxr-xr-x 24 1000 1000 4096 May 18 07:47 netbeans-6.5.1
-rw-r--r-- 1 1000 1000 11 May 19 19:17
<...>
226 Directory send OK.
ftp> get output
local: output remote: output
200 PORT command successful. Consider using PASV.
150 Opening BINARY mode data connection for output (11 bytes).
226 File send OK.
11 bytes received in 0.01 secs (1.3 kB/s)
ftp>
------------------------------------------------------------------------------------------------------------

The file is saved to the folder from where u executed the FTP command!

Testing from external network is more essential!

Testing from External Network


Testing from external network shall require a external computer, maybe some friend who's willing to help you out. The procedure is pretty simple...

Get the external IP of your Router/Modem from http://www.knowmyip.com/
Tell ur friend to log into the system by,
$ftp

Rest checks are same as for an internal network!

Here are some snippets of my friend accessing my system from outside the network :)



Note that here while pasting file it gave 550 error! That is because my FTP server was set up so, please make sure your FTP settings are cool enough!




Saurav using FireFtp to do FTP transactions