Forum Moderators: phranque
How can I send 403 code to malicious post request.
for example i have index.php, index.html, viewtopic.php etc. pages which no need to POST requests to view it. just GET works fine as i see in the log file. (maybe i am wrong)
an example a log of flood attack to our site.
81.215.70.33 - - [16/Jan/2005:07:52:30 -0600] "POST /index.php
HTTP/1.0" 302 287 "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT
I try to add this lines to htaccess file.
RewriteCOnd %{QUERY_STRING} POST /index.php [OR]
RewriteRule .* - [F]
but i get internal server error.
any idea or have any link for htaccess file example for the phpbb forums flood attack protection?
thanks in advance.
POST /viewtopic.php?t=1 HTTP/1.1 QUERY_STRING contains only the qs, in this case
t=1 RewriteCond %{THE_REQUEST} POST /(index\.(html¦php)¦viewtopic\.php) [OR]
RewriteCond %{HTTP_USER_AGENT} ^-$ [OR]
RewriteCond %{HTTP_REFERER} ^-$
RewriteRule .* - [F] are all three files in your document root?
RewriteCond %{THE_REQUEST} POST /(index\.(html¦php)¦viewtopic\.php) [OR]
RewriteCond %{HTTP_USER_AGENT} ^-$ [OR]
RewriteCond %{HTTP_REFERER} ^-$
RewriteRule .* - [F]
Edit : I changed the broken pipes with solid ones but I still getting internal server error.