World Wide Web has become an ultimate source of information. Traditional services such as banking, education, medicine, defence, and transportation are being presented by web applications. Whenever the users make use of any web application, all the activities of the users get automatically get appended into the web log files. The web log file data helps the website owners in number of ways such as customization of web content, pre-fetching and caching, E-commerce, etc. However, the web log file data is exposed to number of attacks. In this paper, a new technique has been proposed to prevent the log file data from the two most common attacks: Brute force attack and DDoS attack.