Previous Thread
Next Thread
Print Thread
Hop To
Joined: Oct 2006
Posts: 37
newbie
newbie
Joined: Oct 2006
Posts: 37
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?

Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
Joined: Jun 2006
Posts: 9,242
Likes: 1
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.

Joined: May 2008
Posts: 753
Likes: 1
Old Hand
Old Hand
Joined: May 2008
Posts: 753
Likes: 1
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.



"No matter where you go, there you are."
"If you can't do something smart, Do something right"
"There are three kinds of people in the world, those who can count, and those who can't"
Joined: Oct 2006
Posts: 37
newbie
newbie
Joined: Oct 2006
Posts: 37
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?

Joined: Dec 2006
Posts: 1,235
veteran
veteran
Joined: Dec 2006
Posts: 1,235
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


Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
spam issues
by ECNet - 03/19/2024 11:45 PM
Looking for a forum
by azr - 03/15/2024 11:26 PM
Editing Links in Post
by Outdoorking - 03/15/2024 9:31 AM
Question on barkrowler and the like
by Mors - 02/29/2024 6:51 PM
Member Permissions Help
by domspeak - 02/27/2024 6:31 PM
Who's Online Now
2 members (Havenofsobriety, rootman), 624 guests, and 106 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20230217)