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 2020 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: 214
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.
  #16  
Old 21 Jan 2013, 13:21
firstimecaller's Avatar
firstimecaller firstimecaller is offline
 
Join Date: Feb 2004
my link simply points to a script which generates the deny block for an .htaccess file. You generate your .htaccess and copy and paste it into your .htaccess appropriately.

there is no linking to another server, or reliance upon anyone else. it is in YOUR .htaccess. It's just a tool to generate the info that you are providing. I found it simpler in my case, so I was just sharing it in case it helped anyone else.

Thanks again for the idea for this, cheers!
Reply With Quote
  #17  
Old 01 Feb 2014, 22:40
AdjusterGuru AdjusterGuru is offline
 
Join Date: Jan 2014
Hostboard, your htaccess file is massive. Will is work on vb 5.0.5?

Would that code be copy pasted in the .htaccess file in the root folder of VB5.0.5 below the following last default entry: </IfModule> ?

Will an htaccess that large slow down the website for users?
Reply With Quote
  #18  
Old 02 Feb 2014, 05:38
K4GAP K4GAP is offline
 
Join Date: Mar 2008
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
That "better solution" is for vb 3.8.
__________________

Reply With Quote
  #19  
Old 02 Feb 2014, 21:18
Hostboard's Avatar
Hostboard Hostboard is offline
 
Join Date: May 2002
Real name: Steven
Originally Posted by AdjusterGuru View Post
Hostboard, your htaccess file is massive. Will is work on vb 5.0.5?

Would that code be copy pasted in the .htaccess file in the root folder of VB5.0.5 below the following last default entry: </IfModule> ?

Will an htaccess that large slow down the website for users?
.htaccess is a Linux thing, so as long as you are running some flavor of Linux, it is usable. As for the size vs slow down, there are too many variables to answer this. Best is to try and see what happens
Reply With Quote
  #20  
Old 03 Feb 2014, 19:57
AdjusterGuru AdjusterGuru is offline
 
Join Date: Jan 2014
Thanks Hostboard, I will experiment with that once I go live with the forum. I am on a linux server. How often would it be suggested to update that list?

Question, it looks like the list is a list of ip addresses within each country to block.

Is there a way to block the entire country? Or is there a way to only allow USA visitors in the htaccess file?

FYI, theWordPress plugin "IQ-Block-Country" uses a GeoIP.dat file. I am wondering if that is a list of IP addresses like in your file, but I was unable to open it with MS Office, Visual Studio, DreamWeaver and other programs. Do you know of any free programs to view a .dat file with? (I was unable to upload it with this post).

Thanks again so much!
Reply With Quote
  #21  
Old 05 Feb 2014, 09:02
gargamello gargamello is offline
 
Join Date: Dec 2006
Hi.
In this file there are 3 errors.

Line 3660

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Replace with:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Line 38315

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Replace with:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Line 116150
Add a close tag </Files>
Reply With Quote
  #22  
Old 06 Feb 2014, 03:48
Hostboard's Avatar
Hostboard Hostboard is offline
 
Join Date: May 2002
Real name: Steven
Originally Posted by AdjusterGuru View Post
Thanks Hostboard, I will experiment with that once I go live with the forum. I am on a linux server. How often would it be suggested to update that list?

Question, it looks like the list is a list of ip addresses within each country to block.

Is there a way to block the entire country? Or is there a way to only allow USA visitors in the htaccess file?

FYI, theWordPress plugin "IQ-Block-Country" uses a GeoIP.dat file. I am wondering if that is a list of IP addresses like in your file, but I was unable to open it with MS Office, Visual Studio, DreamWeaver and other programs. Do you know of any free programs to view a .dat file with? (I was unable to upload it with this post).

Thanks again so much!
If you remove the hash tag in front of the word deny under each countries entry you essentially will block that country. Remember this is not fool proof as open proxies are a dime a dozen and there are even other ways to circumvent this method of blocking. But at least it is something...
Reply With Quote
  #23  
Old 07 Feb 2014, 08:29
AdjusterGuru AdjusterGuru is offline
 
Join Date: Jan 2014
Originally Posted by Hostboard View Post
If you remove the hash tag in front of the word deny under each countries entry you essentially will block that country. Remember this is not fool proof as open proxies are a dime a dozen and there are even other ways to circumvent this method of blocking. But at least it is something...
Thanks Hostboard.

Sorry to sound so stupid. Can you give me a sample of the complete html code for any one country please. Thanks much!

Last edited by AdjusterGuru; 07 Feb 2014 at 08:30. Reason: spelling error
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 02:02.

Layout Options | Width: Wide Color: