PDA

View Full Version : How to ban a Country IP?


Stationery-Direct
6th June 2009, 15:18
Anybody got any ideas? I have been receiving lots of spam posts from people in India and Pakistan. We are a UK based forum only so don't want members from over overseas, especially ones that spam.

I know this isn't a fool proof solution but it may help, how do I ban country IP addresses in vbulletin? How do I find out what they are etc?

Many thanks for any help.

DBMark
6th June 2009, 17:30
Hi,
The normal way to do this on a website is to use the "deny" function in your .htaccess file
You can look at various help pages on google by doing a search on (for example) "htaccess deny ip"
However it sounds as though you're looking for a way via vbulletin. Is there a forum (there must be?) for vBulletin users and administrators. If so, do a search there (again on htaccess ip deny) to see what the best way to do it is. Most forum software have a specific way to do this which avoids the need to directly edit the .htaccess file yourself.

Stationery-Direct
6th June 2009, 20:30
Thanks for the reply, I don't think I have asked the right question, I know how to ban an IP in vbulletin, what I want to know if possible is do Countries have specific IP addresses? For example do all in India start with 123.

If this is the case then I can ban all IP's starting with 123, where would I find that out, any ideas?

Offshore
6th June 2009, 21:13
If you are running a local mail server ( Windows 2003/2008 SBS for instance) you can block certain IP addresses from sending into your mail server. If you don't have your own local mail server then its probably a good idea to speak to your ISP see if they can apply some server side spam filtering for you. The beauty of it is that it cuts out the spam before it even touches your machine..

M

cmcp
6th June 2009, 21:24
He's talking about spam posts to the forum, and blocking web visitors by location.

Judge_Joolz
6th June 2009, 23:37
Googling

'country based ip address'

brings up loads of db's and software to do it.......


Best regards


JJ

openmind
7th June 2009, 08:52
http://www.ipaddresslocation.org/ip_ranges/get_ranges.php

This will get you the range for any country BUT:

1) Be careful using the information as it may be subject to change and you won't know about it
2) Blocking ranges is not an exact science and you may well end up blocking legitimate users

Stationery-Direct
7th June 2009, 11:02
Thanks guys will look into it.

stugster
8th June 2009, 07:10
.htaccess file:

<Limit POST>
order allow,deny
deny from 58.14.0.0/15
deny from 58.16.0.0/16
deny from 58.17.0.0/17
deny from 58.17.128.0/17

etc. etc.


I have a list of all of China and a big chunk of Russia and India if you want it.

DBMark
11th June 2009, 11:38
Here's an interesting discussion on this subject:

http://serverfault.com/questions/22462/relatively-easy-way-to-block-all-traffic-from-a-specific-country