Restrict Users from viewing frontpage When user enter http://localhost/node then the user will be able to view all the nodes created in the site till date. In the site there are some content type which are viewable to all users on site and some are restricted to created users and shared users.How to stop users from viewing those nodes which they have not created. It will also be OK for me if user enter http:///node then "Page Not Found" displayed.

Please let me know your views.
Drupal has only a very course access control structure for viewing content.  For the authenticated user role, you can set permission to 'view published content' (Drupal 7), but that's about it.   With that permission set the user will be able to view all the published nodes created in the site till date, without it, no content except own content will be visible.

Since the core's built-in support for node access control is rather course,  to control access to view a node, you must use some sort of node access control module.  There is a page at Drupal.org listing all node access modules, with a capsule review of each.  I suggest you take a look at that page to see if you can find a suitable module to control access.

One particular module, named Flexi access, allows you to create access control lists that explicitly contols the published nodes viewable by each logged in user.  This gives you fine grained node access control, but it may also be cumbersome to maintain such lists with a large number of users and nodes.

If you can live with a less fine grained resolution (role) there is the Content Access module.  While still only in beta for Drupal 7, I regard it as stable for role based node access control.  However do not use it for lower resolution (user based) access control, as this mode is not yet stable.

Finally, for more complex access control relationships, there is Organic Groups.  This is large. powerful and fairly complex project, but well suited for complex and entangled access control.

Disclosure: I am the maintainer of Flexi access.