Welcome to WebmasterWorld Guest from 34.238.192.150

Forum Moderators: Ocean10000 & phranque

Message Too Old, No Replies

how to block IP range on .htaccess?

The Chinese spam bot disaster

     
4:20 pm on Jan 20, 2004 (gmt 0)

Junior Member

10+ Year Member

joined:Jan 20, 2004
posts:148
votes: 0


hello, please i'm a newbie dealing with my htaccess, could somebody please help me in blocking the following IP ranges?

211.99.210.0 - 211.99.217.255
211.99.32.0 - 211.99.39.255
218.62.128.0 - 218.63.255.255
61.152.210.0 - 61.152.210.255
219.128.0.0 - 219.137.255.255

these IP ranges are used by Chinese spam bot, email harvesters.

thanks in advance

10:30 pm on Jan 20, 2004 (gmt 0)

New User

10+ Year Member

joined:Sept 4, 2003
posts:15
votes: 0


RewriteEngine on

#deny specified IP range and ban anonymous/open proxy requests
RewriteCond %{HTTP_FORWARDED} !^$ [OR]
RewriteCond %{HTTP:X-Forwarded} !^$ [OR]
RewriteCond %{HTTP:Forwarded-For} !^$ [OR]
RewriteCond %{HTTP:X-Forwarded-For} !^$ [OR]
RewriteCond %{REMOTE_ADDR} ^211\.99\.(21[0-7])\. [OR]
RewriteCond %{REMOTE_ADDR} ^211\.99\.(3[2-9])\. [OR]
RewriteCond %{REMOTE_ADDR} ^218\.(6[23])\. [OR]
RewriteCond %{REMOTE_ADDR} ^61\.152\.210\. [OR]
RewriteCond %{REMOTE_ADDR} ^219\.(12[89]13[0-7])\.
RewriteRule .* - [F]

[edited by: jdMorgan at 12:21 am (utc) on Jan. 21, 2004]
[edit reason] Fixed missing space errors caused by posting [/edit]

11:23 pm on Jan 20, 2004 (gmt 0)

Junior Member

10+ Year Member

joined:Jan 20, 2004
posts:148
votes: 0


thanks a lot Agitprop
11:54 pm on Jan 20, 2004 (gmt 0)

Junior Member

10+ Year Member

joined:Jan 20, 2004
posts:148
votes: 0


Agitprop, please i've added your suggestion to my htaccess but i get internal server error.

you can see my htaccess (without your code)on this thread: [webmasterworld.com...]

thanks