Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
IPDeny: Country Block List Details »
IPDeny: Country Block List
Mod Version: 1.01, by Hostboard (Coder) Hostboard is offline
Developer Last Online: Dec 2019 I like it Show Printable Version Email this Page

vB Version: 4.2.0 Rating: (3 votes - 4.67 average) Installs: 21
Released: 07 Dec 2012 Last Update: 06 Feb 2014 Downloads: 208
Not Supported Additional Files Re-usable Code  

There have always been a lot of requests on how to block certain countries from accessing sites due to SPAMMERS, and while there are various modifications here to help weed these wonderful individuals out, they are not fool proof and or cause too many false positives for some.

Another method is to utilize blocking of IP addresses. Unfortunately vBulletin does not support IP prefixes thus you have to either use wild cards or enter each and every IP address you want to block.

So we are left with utilizing .htaccess files as ultimately this might be the most secure way to block these individuals as they will never reach your site. You can even provide them with a custom message if you so desire as well. Of course this also can be circumvented with the use of open Proxy servers but at least we are making them jump through some hoops and possibly making them go find an easier target.

I have taken the zone files from regional IP space providers and listed them into a singular .htaccess file listing each country individually. By default nothing is blocked. All you need to do is to un-remark any country or singular IP address block. Typically what I do is when a spammer registers I look at the IP address then lock out that block trying not to limit the entire country.

This will work with ANY web site that is running an Apache web server or that can utilize a .htaccess file.

Zone files are typically 99.5% accurate and rarely change. I have made every attempt to be careful in compiling this into a single file. However I am human and do make mistakes so I take no responsibility if there is a bad entry or two in there.


7/12/2012
Initial release

2/5/2014
File updated with Gargamello's fixes to my typos.

Download Now

Only licensed members can download files, Click Here for more information.

Show Your Support

  • To receive notifications regarding updates -> Click to Mark as Installed.
  • If you like this modification support the author by donating.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Comments
  #2  
Old 07 Dec 2012, 12:09
ForceHSS's Avatar
ForceHSS ForceHSS is offline
 
Join Date: Apr 2008
Something like this has already been made
http://www.vbulletin.org/forum/showthread.php?t=291851
Reply With Quote
  #3  
Old 07 Dec 2012, 13:31
Hostboard's Avatar
Hostboard Hostboard is offline
 
Join Date: May 2002
Real name: Steven
Originally Posted by ForceHSS View Post
Something like this has already been made
http://www.vbulletin.org/forum/showthread.php?t=291851
His was the reason i did this as I see a few issues...

False positives with modifications like this for some.
It talks back to his servers for the country block list.

Originally Posted by koneil View Post
Yes it does talk back to the server. Our IP lists on the server are alway up to date even with current changes.
  • If his servers go down, this part of the modification will not work.
  • If he decides to close shop this part of the modification will not work.
  • If he decides not to offer the service, this part of the modification will not work.
  • For those on limited bandwidth, it is using their quota up (even minimally)
  • Potential slowdowns with retrieving the information, whether it be many connections to his server or a few too many hops between you and them, or even 1 hop experiencing high latency.
Mine is a 100% in house solution, that is not relying on someone else to provide the information.
Reply With Quote
  #4  
Old 07 Dec 2012, 13:56
tarzan22 tarzan22 is offline
 
Join Date: Apr 2008
Hello

Which countries are possible block?

regards
__________________
Descarga directa
Reply With Quote
  #5  
Old 07 Dec 2012, 14:06
Max Taxable's Avatar
Max Taxable Max Taxable is offline
 
Join Date: Feb 2011
Typically what I do is when a spammer registers I look at the IP address then lock out that block trying not to limit the entire country.
You can stop most all of the autospam registrations with this:

http://www.vbulletin.org/forum/showthread.php?t=289463

Last edited by Max Taxable; 07 Dec 2012 at 14:12.
Reply With Quote
  #6  
Old 07 Dec 2012, 14:12
Hostboard's Avatar
Hostboard Hostboard is offline
 
Join Date: May 2002
Real name: Steven
Originally Posted by tarzan22 View Post
Hello

Which countries are possible block?

regards
Any or all of them.

Last edited by Hostboard; 07 Dec 2012 at 14:20.
Reply With Quote
  #7  
Old 07 Dec 2012, 14:19
Hostboard's Avatar
Hostboard Hostboard is offline
 
Join Date: May 2002
Real name: Steven
Originally Posted by Max Taxable View Post
You can stop most all of the autospam registrations with this:

http://www.vbulletin.org/forum/showthread.php?t=289463
Again, this only deals with auto spam bots (which is good) but not fool proof or can cause false posatives.

I know there are "other solutions" as I mentioned it in my description...

There have always been a lot of requests on how to block certain countries from accessing sites due to SPAMMERS, and while there are various modifications here to help weed these wonderful individuals out, they are not fool proof and or cause too many false positives for some.
Mine is a different solution for those that want it.
Reply With Quote
  #8  
Old 07 Dec 2012, 14:19
Max Taxable's Avatar
Max Taxable Max Taxable is offline
 
Join Date: Feb 2011
Can't unzip the file, get the error message "No files to extract."
Reply With Quote
  #9  
Old 07 Dec 2012, 14:21
Max Taxable's Avatar
Max Taxable Max Taxable is offline
 
Join Date: Feb 2011
Originally Posted by Hostboard View Post
Again, this only deals with auto spam bots (which is good) but not fool proof or can cause false posatives.
Thus far after a year of real-world testing, it's done neither. It's never missed a spam bot nor interfered with any human.

Yes of course it addresses automated spam, but that's also the bulk of forum spam. We all should have many arrows in our anti-spam quivers.
Reply With Quote
  #10  
Old 07 Dec 2012, 14:25
Hostboard's Avatar
Hostboard Hostboard is offline
 
Join Date: May 2002
Real name: Steven
Originally Posted by Max Taxable View Post
Can't unzip the file, get the error message "No files to extract."
I have re-uploaded using WinZip (prior was WinRar) Please try again...
Reply With Quote
  #11  
Old 07 Dec 2012, 15:43
djbaxter djbaxter is offline
 
Join Date: Aug 2006
Location: Ottawa, Canada
How often do you plan to update this list of IP addresses? Because you ARE going to need to do this - often.

Here's a better solution: http://www.vbulletin.org/forum/showthread.php?t=205044
Reply With Quote
  #12  
Old 07 Dec 2012, 17:01
Hostboard's Avatar
Hostboard Hostboard is offline
 
Join Date: May 2002
Real name: Steven
Originally Posted by djbaxter View Post
How often do you plan to update this list of IP addresses? Because you ARE going to need to do this - often.

Here's a better solution: http://www.vbulletin.org/forum/showthread.php?t=205044
I checked unsupported for a reason... I may update it as my time permits...

Just another solution, whether it is better is up to each individual. Mine is usable across ANY website on ANY platform and is NOT dependent on anything other then the ability to use a .htaccess file.
Reply With Quote
  #13  
Old 08 Dec 2012, 08:20
doctorsexy's Avatar
doctorsexy doctorsexy is offline
 
Join Date: Apr 2011
Real name: Chris
Smashin....
__________________
http://sandstormradio.org
Reply With Quote
  #14  
Old 21 Jan 2013, 08:56
firstimecaller's Avatar
firstimecaller firstimecaller is offline
 
Join Date: Feb 2004
will try this out.

anybody else find the avatars in the first two posts kinda hilarious / ironic?

Jesus... looking right, green death looking left... lulz

edit:
Just a tip: If generating a .htaccess deny block is the goal, perhaps it might be easier to use this tool: http://ipinfodb.com/ip_country_block_htaccess.php

If, like me, you need to block just about everybody BUT Europe and the Americas, it's easier than editing and removing a bunch of ampersands, even if you use find/replace in selections in your favorite text editor, since you'll be doing quite a bit of selecting, paging down, etc.

Plus you'll end up with a much smaller file to parse. I don't know what the overhead is for a bunch of comments in a .htaccess file. Another tip would be to put this into your Apache config file if possible to avoid it being loaded/parsed with each and every server request. I know not everyone has access to this on shared server accounts.

Last edited by firstimecaller; 21 Jan 2013 at 09:16.
Reply With Quote
  #15  
Old 21 Jan 2013, 12:52
Hostboard's Avatar
Hostboard Hostboard is offline
 
Join Date: May 2002
Real name: Steven
Originally Posted by firstimecaller View Post
will try this out.

anybody else find the avatars in the first two posts kinda hilarious / ironic?

Jesus... looking right, green death looking left... lulz

edit:
Just a tip: If generating a .htaccess deny block is the goal, perhaps it might be easier to use this tool: http://ipinfodb.com/ip_country_block_htaccess.php

If, like me, you need to block just about everybody BUT Europe and the Americas, it's easier than editing and removing a bunch of ampersands, even if you use find/replace in selections in your favorite text editor, since you'll be doing quite a bit of selecting, paging down, etc.

Plus you'll end up with a much smaller file to parse. I don't know what the overhead is for a bunch of comments in a .htaccess file. Another tip would be to put this into your Apache config file if possible to avoid it being loaded/parsed with each and every server request. I know not everyone has access to this on shared server accounts.
That is funny...
Again this is a stand alone .htaccess file. The site you point to utilizes access to their server(s)
  • If his servers go down, this part of the modification will not work.
  • If he decides to close shop this part of the modification will not work.
  • If he decides not to offer the service, this part of the modification will not work.
  • For those on limited bandwidth, it is using their quota up (even minimally)
  • Potential slowdowns with retrieving the information, whether it be many connections to his server or a few too many hops between you and them, or even 1 hop experiencing high latency.
Yes you could put this into your Apache config file and it is wiser to do such but like you said no everyone has that level of access.



I use EditPad Pro as it easily adds or removes prefixes to lines.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Mod Options

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 14:12.

Layout Options | Width: Wide Color: