miniBB ®

miniBB

®
Support Forums
  
 · Start · Sign in · 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:38Reply Quote
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 Lead Developer
#2 · Posted: 13 Feb 2009 03:03Reply Quote
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:31Reply Quote
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

BB code for the Bold StyleBB code for the Italic StyleBB Code for the PictureBB code for the URLUpload a File

  ?
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
Check out the File and Picture Attachments add-on: extend your miniBB-forums, attaching images and files.