adh32 — 2012-08-06T19:27:25-04:00 — #1
Can you help a not-very-technical person, please? I use the following code in an htaccess file in an attempt to block a range of IP addresses. The problem is that it does not work. Example:
Allow from all
Deny from 180.76.*.*
My searches indicated that this would block any IP address that begins with those digits. So, my questions are:
Is this code incorrectly formatted?
If so, what should I use?
If not, what might be causing this problem?
If you need more information, I will try to answer as well as I can.
cheesedude — 2012-08-06T20:10:57-04:00 — #2
You do not need the wildcards and that could be the cause of your problem. You block a range of IP addresses like this:
Deny from 180.76
Deny from 212.7.14
The first one will block all IP addresses in the 180.76.xxx.xxx range. The second is more restrictive and blocks in the 212.7.14.xxx range. No need for any dots or wildcards after the start of the range.
adh32 — 2012-08-07T14:29:15-04:00 — #3