hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Hosting Security and Technology : Block GET Requests to specific files
Reply

Hosting Security and Technology Configuring and optimizing web hosting servers and operating systems, developing administration scripts, building servers, protecting against hackers, and general security (SSL certificates, etc.)
Forum Jump

Block GET Requests to specific files

Reply Post New Thread In Hosting Security and Technology Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 04-12-2009, 12:36 PM
dannet dannet is offline
Newbie
 
Join Date: Apr 2008
Location: San Telmo, Buenos Aires
Posts: 12
Question

Block GET Requests to specific files


Hello, I am getting a lot of GET requests from different IPs to 4 nonexistent PHP files on my server. Is there any way to block the requests to avoid the resources use of apache that these requests are generating?

I have installed mod_security but Im not sure about how the block rule should be.

The requests are going to images/log.php, images/log2.php, images/log3.php and images/logi.php of one of the sites hosted on the server, is there any way to block there requests for a specific domain or path?

Thanks in advance
Daniel

Reply With Quote


Sponsored Links
  #2  
Old 04-12-2009, 01:08 PM
mwatkins mwatkins is offline
Web Hosting Master
 
Join Date: Nov 2001
Location: Vancouver
Posts: 2,416
If the requests are from a limited number of IP addresses, you could add a null route for them.

Also, define "a lot":

grep -c "images/log" /path/to/logfile

__________________
“Even those who arrange and design shrubberies are under
considerable economic stress at this period in history.”

Reply With Quote
  #3  
Old 04-12-2009, 03:58 PM
ServerManagement ServerManagement is offline
Platinum quality
 
Join Date: Jul 2005
Location: New Jersey, US
Posts: 1,302
You can add a rule in the mod_security configuration file to block anything you want. Remember to restart apache once you make your changes so it takes effect.

__________________
PlatinumServerManagement (also known as PSM)
The OLDEST and LARGEST server management provider in the USA, with 15+ employees and growing!
Providing quality support for OVER 14 years! Currently supporting over 3,000 servers monthly!

www.PlatinumServerManagement.com Proud member of the NJ BBB & Chamber of Commerce, and Authorized Cpanel Partner.


Reply With Quote
Sponsored Links
  #4  
Old 04-12-2009, 10:43 PM
dannet dannet is offline
Newbie
 
Join Date: Apr 2008
Location: San Telmo, Buenos Aires
Posts: 12
Thanks for the replies

Quote:
Originally Posted by mwatkins View Post
If the requests are from a limited number of IP addresses, you could add a null route for them.

Also, define "a lot"
Are always from different IP addresses, and the number is between 150 and 250 requests by second.

Quote:
Originally Posted by ServerManagement View Post
You can add a rule in the mod_security configuration file to block anything you want. Remember to restart apache once you make your changes so it takes effect.
Im trying to add the rule but Im not sure about how to create it, Im trying with:
Code:
SecRule REQUEST_URI ".*log\.php\?.*"
with no results

Reply With Quote
Reply

Related posts from TheWhir.com
Title Type Date Posted
LeaseWeb Releases First Law Enforcement Transparency Report Web Hosting News 2013-04-11 10:54:27
Kim Dotcom Claims Megaupload Search Warrants Unlawfully Obtained by US Government Web Hosting News 2013-01-04 11:24:29
Liquid Web Updates Block Storage, Adding Scale, Cross Mounting Web Hosting News 2012-12-14 16:17:44
Web Host eUKhost Adds R1Soft Backup to Reseller and Shared Plans Web Hosting News 2011-11-10 16:28:14
.XXX Domain Land Rush Period Begins Web Hosting News 2011-11-08 19:34:24


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
Advertisement:
Web Hosting News:



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?