Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
IPDeny: Country Block List Details »»
IPDeny: Country Block List
Version: 1.01, by Hostboard Hostboard is offline
Developer Last Online: Oct 2023 Show Printable Version Email this Page

Category: Administrative and Maintenance Tools - Version: 4.2.0 Rating:
Released: 12-06-2012 Last Update: 02-05-2014 Installs: 22
Re-useable Code Additional Files  
No support by the author.

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

File Type: zip htaccess.zip (366.5 KB, 140 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
2 благодарности(ей) от:
gargamello, Max Taxable

Comments
  #22  
Old 02-05-2014, 08:02 AM
gargamello gargamello is offline
 
Join Date: Dec 2006
Posts: 2
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi.
In this file there are 3 errors.

Line 3660
Code:
CAMBODIA (KH)#
Replace with:
Code:
# CAMBODIA (KH)
Line 38315
Code:
119.252.112.0/20
Replace with:
Code:
# deny from 119.252.112.0/20
Line 116150
Add a close tag </Files>
Reply With Quote
Благодарность от:
Hostboard
  #23  
Old 02-06-2014, 02:48 AM
Hostboard's Avatar
Hostboard Hostboard is offline
 
Join Date: May 2002
Location: CT
Posts: 843
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
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
  #24  
Old 02-07-2014, 07:29 AM
AdjusterGuru AdjusterGuru is offline
 
Join Date: Jan 2014
Posts: 18
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
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!
Reply With Quote
Reply


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

Forum Jump


All times are GMT. The time now is 06:38 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05141 seconds
  • Memory Usage 2,265KB
  • Queries Executed 19 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (4)bbcode_code
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (4)post_thanks_box
  • (3)post_thanks_box_bit
  • (4)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (2)post_thanks_postbit
  • (4)post_thanks_postbit_info
  • (3)postbit
  • (1)postbit_attachment
  • (4)postbit_onlinestatus
  • (4)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete