WebProWorld Part of WebProNews.com
Page One Link To Us Edit Profile Private Messages Archives FAQ RSS Feeds  
 

Go Back   WebProWorld > Webmaster, IT and Security Discussion > IT Discussion Forum
Subscribe to the Newsletter FREE!


Register FAQ Members List Calendar Arcade Chatbox Mark Forums Read

IT Discussion Forum Having IT issues? Got IT questions? Who doesn't? If you can't get your Apache to work with your MySQL or your php is choking on your ODBC... Let's see if we can help you come up with some ideas.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 01-22-2008, 02:07 PM
WebProWorld New Member
 

Join Date: Dec 2004
Location: Pennsylvania Dutch Country
Posts: 6
ragman RepRank 0
Default IP block in .htaccess not working?

I sometimes find spammy entries in my error logs - that read something like "GET http://2.2.2.2/cgi-bin/p.35.pl HTTP/1.0" So far I've usually been able to block them in my .htaccess file with this type of entry:

order allow,deny
deny from 58.215.87.10
allow from all

It has worked well, with one exception - the IP above still appears regularly in my logs with one request every few days. Why can't I block this one, and should I worry about it?
__________________
Bill B
Sharon's Antiques: Vintage Fabrics http://www.rickrack.com
Reply With Quote
  #2 (permalink)  
Old 01-22-2008, 02:29 PM
wige's Avatar
Moderator
WebProWorld Moderator
 

Join Date: Jun 2006
Location: United States
Posts: 1,782
wige RepRank 4wige RepRank 4wige RepRank 4wige RepRank 4
Default Re: IP block in .htaccess not working?

Most likely, there is some other setting that is allowing the bot to circumvent your .htaccess file, and that would be cause for concern. Are you on a shared or dedicated host? Also, can you post an example of the log file entry for the blocked IP?
__________________
The best way to learn anything, is to question everything.
Reply With Quote
  #3 (permalink)  
Old 01-22-2008, 03:33 PM
WebProWorld Pro
 

Join Date: Jan 2008
Posts: 290
Tech Manager RepRank 1
Default Re: IP block in .htaccess not working?

Quote:
Originally Posted by ragman View Post
I sometimes find spammy entries in my error logs - that read something like "GET http://2.2.2.2/cgi-bin/p.35.pl HTTP/1.0" So far I've usually been able to block them in my .htaccess file with this type of entry:

order allow,deny
deny from 58.215.87.10
allow from all

It has worked well, with one exception - the IP above still appears regularly in my logs with one request every few days. Why can't I block this one, and should I worry about it?
I don't think the problem (yet) is that you have a configuration problem permitting the spammer/bot to bypass your .htaccess file. Generally speaking, if your htaccess file is working properly most of the time it should be working properly all the time.

The data you posted is a tad incomplete. If you have a couple of complete lines from your error logs and access logs then either post them here or send them to me in a private message. I'll look at them and have a better idea how to resolve the problem.

Incidentally, if you are not using your cgi-bin you can just as easily block all access to it.

Without knowing anything about your site and without seeing your server logs I'll just remind you that various hackers, spammers & script kiddies will run scripts searching for specific exploitable directories, files, filetypes, daemons and prepackaged programs running on your server. When they find what they are looking for they will often begin various assaults using proxy servers and/or other IP addresses to mask their identity.

The best prevention is to make your scripts as bullet proof as possible, limit traffic origins to locations acceptable to you (when possible and practical create rulesets to allow or deny access from certain IP ranges. You can use resources such as Country IP BLocks to create .htaccess files and other access/deny files by country), become as familiar as possible with available logs (on Linux, for example, watch things like your secure, message, access_log & error_log logs on each website you manage and at server level if you are running a dedicated server).

I'd be more than happy to offer some free assistance or advice.

Best regards,

Tech Manager
__________________
I use Country IP Blocks as added security for my networks and servers.
Reply With Quote
Reply

  WebProWorld > Webmaster, IT and Security Discussion > IT Discussion Forum


Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Block An IP billc IT Discussion Forum 8 11-15-2007 03:04 PM
Updated .htaccess to Block spammers / scammers. kgun Internet Security Discussion Forum 5 02-20-2007 12:45 PM
Using .htaccess To Block Russia Visitors? TN Todd Graphics & Design Discussion Forum 3 12-02-2006 05:15 PM
http://www.superactive.biz what 's working / not working jrobin747 Submit Your Site For Review 3 02-08-2005 11:16 PM
.htaccess to block image requests? CLBridges Web Programming Discussion Forum 6 11-11-2003 05:33 PM


Search Engine Optimization by vBSEO 3.2.0