Attack on website!
Recently I came across slowing down a website by unknown sources. Reason was some unknown IP hitting website multiple times in a minute(mine was around 500 times :O). Those IP may be famous for ignoring directives in robots.txt.
Below measures you can take in order to avoid those attacks:
- Put rewrite condition in htaccess. e.g:
-
RewriteEngine On
-
RewriteCond %{HTTP_USER_AGENT} REQUESTAGENT [NC] RewriteRule .* - [F,L]
- Install mod_evasive module into your Apache server. This will help you in below scenarios:
- It will ban an IP if it hits the same page A times in B seconds.
- It will ban an IP if it hits any combination of pages on the site C times in D seconds.
Hope this will help you in future! ;)
Technical Architect with in IT, E-Commerce, and System Architecture
9 年Thanks for this info :)
Enterprise Solutions Architect @ Tata Consultancy Services | Application Architecture
9 年Thanks for sharing... fortunately, there are a number of Apache modules that can be integrated with the web server to provide some measure of protection against DDoS attacks and other attacks that seek to exploit weaknesses in Apache. You can also check below once: #Mod_security You can think of mod_security as a firewall for Apache. Just like any other firewall, it monitors incoming connections to a server and the requests carried by those connections. If it notices patterns that conform to an attempt to exploit known vulnerabilities: an SQL injection attack, for example, mod_security can block the connection. #Mod_qos QOS stands for quality of service. Denial of service attacks attempt to degrade the quality of service to the point at which a site becomes unusable. This module has some crossover with mod_evasive, in that both of them attempt to mitigate the effects of DDoS attacks, but mod_qos is also useful for maintaining some quality of service during traffic spikes. Mod_qos manages connections to determine which requests should be honored; it can manage the maximum number of concurrent requests to a URL, limit the bandwidth available for requests for a specific URL and the number of requests, and rate limit client requests across all URLs.