Forum Moderators: phranque

Message Too Old, No Replies

.htaccess advice - banning IP addresses

         

jim_knopf

3:38 pm on Jun 7, 2009 (gmt 0)

10+ Year Member



Hello all,

could some body give me some advise on my htacces file please.

I did try to add 2 more IP's (the last and second last) yet there is some problem since I see them IP's keep showing up in my logs so I asume I screwed up.

The first after the main container, limelight seem to work since they are gone.

In fact the second last i like would be whole range from xx-xx as last 2 digits when locking for the orginal I seen they have several.

I like to ban them all, server wide. Even better I like to send them somewhere like Google or seamstress or so....

A apericiate any advise and please no look at my english, stiil pretty bad... aint my first language

<IfModule mod_rewrite.c>
Options +FollowSymlinks
RewriteEngine On
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !http://www.#*$!#*$!#*$!x-live.com
RewriteRule (wp-content/postpics.*\.(gif¦jpg¦jpeg¦png)$) [#*$!#*$!#*$!x-live.com...] [L]
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

<Limit GET HEAD POST>
order allow,deny
##--> Bye bye Limelight Networks. You are not welcome here.
deny from 208.111.128.0/18
allow from all
</LIMIT>

<Limit GET HEAD POST>
order allow,deny
##--> Bye. You are not welcome here.
deny from 68.8.0.xx
allow from all
</LIMIT>

<Limit GET HEAD POST>
order allow,deny
##--> bye bye. You are not welcome here.
deny from 66.54.170.#*$!
allow from all
</LIMIT>

jim_knopf

3:39 pm on Jun 7, 2009 (gmt 0)

10+ Year Member



Forgot: I have root access at server running linux 11.0

wilderness

3:53 pm on Jun 7, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Three modules (not sure of correct terminology) is unnecessary replication and may not function as intended.

Try the following (as an aside denial does NOT stop the requests and/or denials from appearing in your logs.)

<Limit GET HEAD POST>
order allow,deny
##--> Bye bye Limelight Networks. You are not welcome here.
deny from 208.111.128.0/18
deny from 68.8.0.xx
deny from 66.54.170.#*$!
allow from all
</LIMIT>

g1smd

4:07 pm on Jun 7, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



You can only have one Limit group, so combine all into one longer ruleset as above.

jdMorgan

4:15 pm on Jun 7, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



"deny from 68.8.0.xx" is not valid syntax.

Replace it with "Deny from 68.8.0"

Fix the next line in a similar manner.

Note that you may include several IP address/range specifications on one line, separaed with a single space:


Deny from 208.111.128.0/18 68.8.0 66.54.170

Jim

jim_knopf

9:59 pm on Jun 7, 2009 (gmt 0)

10+ Year Member



Ok wilderness and jdMorgan I will do as advised

have a great Sunday