miniBB ® miniBB®
miniBB Support Forums
 | Forums | Register | Reply | Search | Statistics | Manual |
Custom Tutorials and Modifications miniBB Support Forums / Custom Tutorials and Modifications /   

Ban certain IP ranges from registration

Author Vodicka
Registered
#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 | Edited by: Paul 
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
Registered
#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 Top

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

 Short link for this topic:

 ?
Only registered users are allowed to post here. Please, enter your username/password details upon posting a message, or register first.


Before posting, make sure your message is compliant with our forum posting rules. If not, it may be locked or deleted with no explanation.
 
miniBB Support Forums Powered by Forum Software miniBB ® Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contacts
Check out the Captcha add-on: protect your miniBB-forums from the automated spam and flood.
Captcha Addon for miniBB