Forum Moderators: phranque

Message Too Old, No Replies

htaccess intermittently failing

question regarding how htaccess will sometimes allow banned IPs

         

jec2005

11:55 pm on Aug 29, 2005 (gmt 0)

10+ Year Member



I have banned certain IPs, and those addresses are consistently banned - except on a few occasions. Somehow the banned IPs are given access, and I can't imagine how or why. Any ideas would be greatly appreciated.

Update: Would it be because I put a trailing period at the end of a subnet restriction? Like 99.999.99. instead of just 99.999.99?

jdMorgan

12:28 am on Aug 30, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



jec2005,

Welcome to WebmasterWorld!

> Would it be because I put a trailing period at the end of a subnet restriction?

Not likely.

If you omit a trailing period on a subnet restriction such as 11.11.11, then that will block 11.11.11.0 through 11.11.11.255, and also 11.11.111.0 through 11.11.119.255.

Let me ask, how are you determining that .htaccess is "failing"?

If you are seeing 200-OK responses in your raw log file, then look carefully at the Remote IP addresses, remote Hosts, Referrers, and Requested URLs. It is likely either that you have an error in the specification for blocking based on one of these variables, or that you have allowed an exception for one of them, thus allowing access.

Relying on 'stats' or anything other than raw logs can be misleading.

Jim

jec2005

2:04 am on Aug 30, 2005 (gmt 0)

10+ Year Member



Well, you certainly know what you are talking about. And thank you for sharing it.

I checked the stats, which is what I've been going by all along, against the raw logs, and the raw logs show no visit at all by that IP at the day and time indicated in the stats. In addition, raw logs show consistent denials to that IP -- with no exceptions.

Lesson learned: stats are worthless.

Again, thank you very much.

jdMorgan

3:02 am on Aug 30, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



? ...raw logs show consistent denials to that IP -- with no exceptions

Ah, good news!

Jim