miniBB ®
 
miniBB Community Forum
 | Forums | File Bank | Sign Up | Reply | Search | Statistics | Manual |
Polls addon for miniBB Organize opinions on miniBB-forums, collecting them with the Polls & Surveys add-on!
Custom Tutorials and Modifications miniBB Community Forum / Custom Tutorials and Modifications /
Short link for this topic:

Ban certain IP ranges from registration

Author Vodicka
Forums Member
#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
CEO
#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
Forums Member
#3 | Posted: 13 Feb 2009 04:31
Thanks. I' ll definitely give it a try.
Custom Tutorials and Modifications miniBB Community Forum / Custom Tutorials and Modifications / Ban certain IP ranges from registration Top
Your Reply Click this icon to move up to the quoted message

» Username  » Password 
You are welcome to post anonymously by entering a nickname with no password (if that nickname has not been taken by another member) or by leaving both fields empty. If you have a forums membership account, you can also sign in from this page without posting a message, or sign in and post at once.


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 Community Forum Powered by Free Forum Software miniBB ® Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contacts