How can I ban an IP address from accessing my site?

How can I ban an IP address from accessing my site?

by yrahsa onamat -
Number of replies: 3
How can I ban a certain IP address from accessing my site? Any help will be greatly appreciated...
Average of ratings: -
In reply to yrahsa onamat

Re: How can I ban an IP address from accessing my site?

by Sarah King -

add the following to a file called .htaccess which should be in the root of your webserver
ie: /www/myaccount/public_html/.htaccess
/www/virtual/htdocs/.htaccess

<Limit GET HEAD POST>
order allow,deny
deny from 200.174.151.122
deny from 203.222.151.66
deny from 211.152.14.96
deny from 212.235.110.99
deny from 213.204.212.153
deny from 216.240.136.222
deny from 24.101.46.193
deny from 24.156.24.170
deny from 24.167.75.133
deny from 66.143.183.179
deny from 67.114.147.154
deny from 68.123.196.18
deny from 69.56.208.106
deny from 69.56.215.122
deny from 69.93.129.74
deny from 69.93.207.2
deny from 69.93.38.130
deny from 69.93.48.122
deny from 80.178.68.70
deny from 80.179.0.37
deny from 80.181.182.148
deny from 80.232.169.174
deny from 80.61.129.224
deny from 82.166.67.76
deny from 82.197.197.79
allow from all
</LIMIT>

and just ip addresses as the nasties present themselves.

To see where I get the list above from visit: http://bots.pcpropertymanager.com/modules.php?name=BS_IPCheats

Sarah

In reply to yrahsa onamat

Re: How can I ban an IP address from accessing my site?

by Jeff Wood -

Ashary,

Another method if you have server access via CPanel is to use the IP Deny Manager

Best of luck

Jeff