Suggestions for country banning?

Share ideas on running a business and tools to help you with your websites such as hosting, traffic analytics, etc.
Locked
User avatar
NiTe
Experience Level 3
Experience Level 3
Posts: 105
Joined: Tue Jan 23, 2007 6:36 pm
Location: 127.0.0.1
Contact:

Suggestions for country banning?

Post by NiTe » Sun Apr 13, 2008 4:58 pm

Hi. Since I'm running AOM, and since Amazon only offers to sell its products in certain countries, I would love to IP ban the rest of the world where Amazon does not sell its products.

Someone from China and someone from Spain have requested over 15,000 pages from some of my AOM sites within a few days -- I don't know why! The result is that my dedicated server slows down (it doesn't die) and the load increases.

Does anyone have a solution for this? Isn't there some kind of .php script that automatically throws up a 503 error code when too many requests are performed in a short period of time? Needless to say, I wish to exclude the search engines from getting this error code; I just wish to lock out humans who are browsing my site and using up resources.

I wonder if these people are content scraping my site -- which might ultimately impact my results in the SERPS.

Thanks!
Associate-O-Matic is changing. For the better. 8)

Please CLICK HERE for our important announcement.

mcarp555
Admin
Admin
Posts: 4088
Joined: Thu Sep 14, 2006 5:19 pm
Location: United Kingdom
Contact:

Re: Suggestions for country banning?

Post by mcarp555 » Mon Apr 14, 2008 1:11 am

If you use Cpanel, there's an IP Deny Manager feature that allows you to enter IP addresses. You can just use the first set of digits (like 123.*.*.*) which should block an entire country. Other webhosts that don't use CP should have a similar feature.

Conversely, you can put code into your .htaccess file to block certain IPs:

Code: Select all

order allow,deny
deny from 192.168.
deny from 10.0.0.
allow from all
Changing the IP addresses under 'deny' to suit. Note you can use partial IPs to ban a whole range.

Finally, you can use the IP filter in AOM under the Filter tab.

Use any combo, or all three if you want.
Associate-O-Matic is changing. For the better. 8)

Please CLICK HERE for our important announcement.

leewal
Posts: 3
Joined: Thu Mar 25, 2010 7:17 pm

Re: Suggestions for country banning?

Post by leewal » Thu Mar 25, 2010 7:23 pm

This problem haunts us all sooner or later.. I admin a VB board that had major problems from post spammers in a number of eastern European and Asian countries - using .htaccess is the trick.. google "ban IP by country" - you will find a number of online IP list generators by country to add to your file... the list of country IPs can be large so you do not want to try to manually generate a list.
Associate-O-Matic is changing. For the better. 8)

Please CLICK HERE for our important announcement.

www.aeronautic.net
Experience Level 2
Experience Level 2
Posts: 66
Joined: Mon Jun 19, 2006 10:58 am

Re: Suggestions for country banning?

Post by www.aeronautic.net » Fri Aug 06, 2010 2:10 pm

See if your host offers "ConfigServer Security & Firewall" - or if you have the ability to install it yourself.

It integrates neatly with cPanel and WHM if you have that set-up.

There is a ban by country code feature that is helpful. Use with caution though - the sheer number of IPs per country can seriously effect your server's performance - or crash it if it is not up to the task.

I know that is not a country list but you can get clues as to which countries from your own logs.

HTH
Associate-O-Matic is changing. For the better. 8)

Please CLICK HERE for our important announcement.

Locked

Who is online

Users browsing this forum: No registered users and 1 guest