UBBCentral
Posted By: BradHa Any thought of using geoIP here? - 12/09/2009 5:27 PM
I have been getting spammed fairly consistently from someone in India.

For my site, there is really no reason for me to allow anyone from India to post on it since it is more of a local thing anyhow.

I would like to ban the entire country from accessing the forums.

If I could find an existing list that covers all IP ranges for India, I would use that but the really nice thing would be if the forums supported the geoIP protocals.

Any ideas on how to accomplish my goal?
Posted By: Rick Re: Any thought of using geoIP here? - 12/09/2009 5:31 PM
For now, the easiest thing to do would probably be to use http://www.countryipblocks.net

On the right side you can choose a country and get a list of IP blocks for that country.
Posted By: Bad Frog Re: Any thought of using geoIP here? - 12/09/2009 5:39 PM
get the IP blocks and add them to your .htaccess, they won't be able to access any of your site.

I had to do that for a while, I had most of mainland china banned at one point.

Posted By: BradHa Re: Any thought of using geoIP here? - 12/09/2009 6:22 PM
how do you add them to your .httaccess file.

I know the file, but how do you code the block.

Plus, the code comes back as: 58.146.96.0/19

Can the ban list handle that slash at the end of the IP number?

Which format should I select?
Posted By: ScriptKeeper Re: Any thought of using geoIP here? - 12/09/2009 7:45 PM
Originally Posted by BradHa
how do you add them to your .httaccess file.

Like this:

Code
order allow,deny
deny from 144.29
deny from 64.92.199
deny from 219.142.50.253
allow from all
© 2019 UBB.threads PHP Forum Software Community