Thanks Ricky for your prompt reply.
But the scenario was only a example, what if a want to block a entire category of porn sites,
the blacklist which I have contains around lacs of entries, and all are blocked when one tries to access it. Keying in IP of any restricted domain will allow it.
Regards
Ram.