miniBB ® 

miniBB

®
Support Forums
  
 | Start | Register | Search | Statistics | File Bank | Manual |
Custom Tutorials and Modifications miniBB Support Forums / Custom Tutorials and Modifications /  
 

Ban certain IP ranges from registration

 
Author Vodicka
Partaker
#1 | Posted: 12 Feb 2009 16:38 
Would it be difficult to filter some IP ranges (typically known proxies) and not allow users from those ips to register or/and post? Well lets start with "to register" ...

Say, I know that some troublemakers are trying to register from proxy that belongs to range 67.159.0.0 to 67.159.127.255 and I do not want them to register at all.

Would it be complicated task?

Author Paul
Lead Developer 
#2 | Posted: 13 Feb 2009 03:03 
This would be a very easy code for bb_plugins.php (preferably paste it before Captcha code):

/* Prevent certain IP range from registration */

if(($action=='registernew' or $action=='register') and "{$cen[0]}.{$cen[1]}"=='67.159' and $cen[2]>=0 and $cen[2]<=128) die('Your IP address is banned for registration');

/* --Prevent certain IP range from registration */
Here, $cen variable is generated in index.php each time when forum action executes, so we could merely use it in the above code or similar process. Look up for /* Banned IPs/IDs stuff */

Author Vodicka
Partaker
#3 | Posted: 13 Feb 2009 04:31 
Thanks. I' ll definitely give it a try.

Custom Tutorials and Modifications miniBB Support Forums / Custom Tutorials and Modifications /
 Ban certain IP ranges from registration
 Share Topic's Link

Your Reply Click this icon to move up to the quoted message


  ?
Post as a Guest, leaving the Password field blank. You could also enter a Guest name, if it's not taken by a member yet. Sign-in and post at once, or just sign-in, bypassing the message's text.


Before posting, make sure your message is compliant with forum rules; otherwise it could be locked or removed with no explanation.

 

 
miniBB Support Forums Powered by Forum Software miniBB ® Home  Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contact Us
Proceed with the Captcha add-on: protect your miniBB-forums from the automated spam and flood.


  ⇑