Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
Advanced IP Ban Manager Details »
Advanced IP Ban Manager
Mod Version: 0.3.1, by Carnage (Coder) Carnage is offline
Developer Last Online: Sep 2014 I like it Show Printable Version Email this Page

This modification is in the archives.
vB Version: 3.7.x Rating: (3 votes - 4.67 average) Installs: 139
Released: 25 Jul 2008 Last Update: 12 Jun 2009 Downloads: 1337
Not Supported DB Changes Uses Plugins Additional Files Translations Is in Beta Stage  

Advanced IP ban manager

What is it/What does it do?

This is intended as a replacement for the ip bans under vbulletin options. It allows for timed ip bans, cidr ranges and attatching reasons to bans.

It also features registration only ip bans allowing members who may be effected by an ip ban to continue using the forums, but blocking registrations and ip ban exempts so that you can ban a large range of ips and let through a smaller subset of them.

Features
  • Ip bans
  • Timed ip bans
  • Ip ban exempts
  • Registration only bans
  • Ban by cidr range
Installation
Backup db.
Upload files from zip.
Import product.
Refresh admincp.

Once Version 0.3 is installed; upload the attached php file into your admin cp to replace the one already there. This file fixes a couple of minor issues for some people.

Changelog
  • 0.3.1
    Added a work around for issues of 0.0.0.0 ips being banned on any system where ip2long returned a signed int instead of an unsigned int.
  • 0.3
    Fixed bug where ip bans wouldn't block registrations unless set to registration only.
    Added file with a list of common spambot ips that can be auto banned.
    Changed limit on cidr range from 16 to 4 As i often came across instances where i wanted to ban larger ranges
  • 0.2.1b
    Added a bitfield rebuild to installer to fix issues with menu not showing.
  • 0.2b
    Fixed bug in instal code.
  • 0.2a
    Added admin permissions and exempt bans
  • 0.1a
    Initial release.


Notes

This has been tested on 3.7.2 but should work on 3.6.x, 3.7.x and 3.8.x

This mod has not been tested on vbulletin 4; a separate, improved vbulletin 4 version can be found HERE

Access is now controlled by an admincp permission however no control over ip banning is done.

This variable can be used in the config file to prevent banning any ip/range of ips that contain the ips listed in it: $config['SpecialUsers']['unbannableips'] = "127.0.0.1|127.0.0.2";
Ips should be separated by a | symbol. This will not effect any bans that are already in place.

Bans are limited to a cidr range of 4. (This should be more than enough) If you require a ban that covers more than this, it should be set in the database. If there is demand for it, I may make the cidr limit optional/changable in future versions.

Exempts/bans work by taking the tightest cidr range match. eg if you ban 127.0.0.1/16 and add an exempt for 127.0.0.1/24 the exempt will take precedence, however adding another ban against 127.0.0.1/32 would override the exempt.

When uninstalling, the mod will remove the modifications to the admin table, however it is upto you to drop the ipbans table yourself. This has been done in order to preserve the data in that table incase you still want it for something.

I've added a file which was created by a member of my admin team, it contains a large list of ip addresses from which A lot of malignant traffic seems to come from. If you are having trouble with spam bots this list may help in preventing them from registering. To use the file visit the url : <your forum url>/admincp/ipban.spambots.php It will ask you to log in to your cp then display a blank page; this is to be expected as all its doing is inserting into the database. It will add approximately 140 bans; so they've been coded NOT to show up in the ip ban list. This feature is something i plan to expand on with a full interface for viewing, creating, adding and removing ip blocklists, but for now this mechanism is what i've come up with.

Support

As all of my boards have been upgraded to vbulletin 4, I am no longer actively maintaining any of my vb3.x mods. Free support for all of my 3.x mods is being removed from the 31st of March 2010 after this date, I will only be offering paid support for 3.x mods; downloading and usage of the mods will remain free but unsupported.

Please pm me for support of 3.x mods as I will not be checking their threads very often.

Support is now offered as this is a beta release. I'll be checking vborg from time to time but for critical support issues, you are best contacting me on my own forums.

I'm hoping that this version (0.3) is bug free, so this can be considered a release candidate version.


I've uploaded a fixed php file for some people who were having problems with short php tags and other parse errors. This needs to be uploaded to the admin cp. The file will be added into the zip once in the next release.

This mod will be has been upgraded to support vb4 The vbulletin 4 version will be released once the beta goes public.

Extra features in vb4.0 version:
  • whois ip from admin cp
  • cidr calculator (shows the ip range that a cidr bans)
  • test bans (enter an ip to see if its banned or not)

Planned features for future versions:
  • import/export bans
  • integration into 'delete posts as spam' => admins with suitable permissions will be able to select a box to ban the posters ip(s) in addition to banning their account(s)

Download Now

Only licensed members can download files, Click Here for more information.

Screenshots

Click image for larger version

Name:	ss1.JPG
Views:	2136
Size:	39.7 KB
ID:	85478   Click image for larger version

Name:	ss2.JPG
Views:	1690
Size:	20.3 KB
ID:	85479  

Show Your Support

  • To receive notifications regarding updates -> Click to Mark as Installed.
  • If you like this modification support the author by donating.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Similar Mod
Mod Developer Type Replies Last Post
Administrative and Maintenance Tools Advanced Template Manager Dream vBulletin 3.6 Add-ons 55 18 Sep 2010 21:03
Administrative and Maintenance Tools Advanced Plugin Manager akanevsky vBulletin 3.6 Add-ons 32 03 Jul 2009 02:13
Administrative and Maintenance Tools Advanced Plugin Manager - Reloaded Revan vBulletin 3.6 Add-ons 25 14 Jan 2009 17:33
Advanced Plugin Manager akanevsky vBulletin 3.5 Add-ons 63 12 Aug 2007 21:04
Advanced Plugin Manager Andreas vBulletin 3.5 Add-ons 79 28 May 2006 00:15

  #91  
Old 05 Sep 2009, 13:51
Carnage Carnage is offline
 
Join Date: Jan 2005
I should probably change that to use $db->fetch_array() will fix in the next version. (probably the vb4 compatible version)
__________________
www.giveupalready.com

If you want/need to contact me, best thing is to pm me on that site, username Carnage.
Reply With Quote
  #92  
Old 18 Nov 2009, 00:23
tommythejoat's Avatar
tommythejoat tommythejoat is offline
 
Join Date: Apr 2008
Real name: Tom McIntyre
Question

My board has a very long list of banned ip's and we are interested in banning ranges of ip's.

I don't understand how CIDR improves upon just using the * wild card in a banned ip. e.g. 221.222.* or 221.222.0.0/16 look the same to me. Am I missing something?

We would like to be able to ban something like 221.222.131-255.* or even 221.222.131-155.*. I don't see any notation that supports this.

Currently I keep the bans in a spreadsheet so I can sort and annotate them. I then just copy the ip column into the ban list in AdminCp.

Maybe if I get used to the notation, I can figure out how to take out a large range and add back in the pieces that are OK to get to the examples above.

I wonder if there is a calculator somewhere that converts the kind of range I listed above to a set of CIDR's.
Reply With Quote
  #93  
Old 20 Nov 2009, 04:13
TheInsaneManiac TheInsaneManiac is offline
 
Join Date: Feb 2008
I will def install if you can add an option to ban from within posts and profiles. Cause searching for a user and then finding their IP is a pain in the butt.
Reply With Quote
  #94  
Old 24 Nov 2009, 21:22
jacx jacx is offline
 
Join Date: Mar 2006
Originally Posted by TheInsaneManiac View Post
I will def install if you can add an option to ban from within posts and profiles. Cause searching for a user and then finding their IP is a pain in the butt.
When looking at your home page... replace index.php with online.php and you can see the ip addresses quite quick that way.

My request is this...if possible.

I have some super mods that I would like to give the ability to. I want to avoid making them admins but ip banning is a feature they need. Is there someway to allow this?

I have tried to give them minimal admin permissions as a secondary group and turned on Can Administer Ipbans to yes but still nothing on their admin cp

Last edited by jacx; 24 Nov 2009 at 21:49.
Reply With Quote
  #95  
Old 02 Dec 2009, 02:12
TheInsaneManiac TheInsaneManiac is offline
 
Join Date: Feb 2008
Feature Requests:
Allow banned IPs to see how long they are banned for.
Add an option to ban from within posts and profiles. Cause searching for a user and then finding their IP is a pain in the butt.

Last edited by TheInsaneManiac; 05 Dec 2009 at 03:48.
Reply With Quote
  #96  
Old 08 Dec 2009, 22:16
Carnage Carnage is offline
 
Join Date: Jan 2005
I don't understand how CIDR improves upon just using the * wild card in a banned ip. e.g. 221.222.* or 221.222.0.0/16 look the same to me. Am I missing something?
yes. You don't have to use just /16 /24 /8 and /32 you could for example use /28 which would ban a range of 16 ips
We would like to be able to ban something like 221.222.131-255.* or even 221.222.131-155.*. I don't see any notation that supports this.
CIDRs aren't perfect, but the following ban 221.222.131.0/19 hits 221.222.128.0 - 221.222.159.255 You could leave it at that or add an exempt for 221.222.128.0/23 and 221.222.130.0/24 to protect the lower end and an exempt for 221.222.156.0/22 to protect the upper end.

I wonder if there is a calculator somewhere that converts the kind of range I listed above to a set of CIDR's.
The latest (vb 4 version) of this mod includes a calculator that goes from CIDR notation to range notation; in theory, if you upload the contents of the uploads folder to your 3.8 install, it should provide the extra features. (Don't import the vb4 product thou, as the mod will cease to work) I'll see how hard it would be to write a calculator to go the other way.

Allow banned IPs to see how long they are banned for.
This might be possible by just editing the phrase... I'll look into it.

Add an option to ban from within posts and profiles. Cause searching for a user and then finding their IP is a pain in the butt.
Its already on the planned feature list to allow banning from the delete as spam page; I see no reason not to include this; however the ip's will probably not be very efficiently banned. (eg it'll have to add a /32 ban for each and every ip the user uses. Trying to automatically work out a range would be VERY error prone.)
__________________
www.giveupalready.com

If you want/need to contact me, best thing is to pm me on that site, username Carnage.
Reply With Quote
  #97  
Old 17 Jan 2010, 14:34
gigaenvy gigaenvy is offline
 
Join Date: Jul 2004
Sorry if I'm dense, but can this mod simply ban the IP address by clicking the IP address icon in the user postbit and making a selection from their? Seems like low-hanging fruit to add this feature from the beginning.

Thanks!
Reply With Quote
  #98  
Old 20 Jan 2010, 19:21
Carnage Carnage is offline
 
Join Date: Jan 2005
i'm afraid that isn't possible, but you are right, it is a fairly low hanging fruit. It'll probably be added along with the other front end integrations that i've got planned; however development time is currently going into the vb4 version of this mod; so I don't know how long it'll be until the new features i've added to that get into this version.
__________________
www.giveupalready.com

If you want/need to contact me, best thing is to pm me on that site, username Carnage.
Reply With Quote
  #99  
Old 25 Jan 2010, 02:45
shuwarriors shuwarriors is offline
 
Join Date: Aug 2009
I've added several IPs but just noticed that in the IP ban manager page the list of IPs is all 0s

Is there a fix for this?
If you could email an answer as I'll find it hard to keep an eye on this; hallamwarriors(at)gmail.com
thanks
Reply With Quote
  #100  
Old 17 Feb 2010, 11:31
Fynnon Fynnon is offline
 
Join Date: Jul 2008
i have banned someone`s ip but i didnt ban him on the forum so he ca still come and post
Reply With Quote
  #101  
Old 17 Feb 2010, 21:24
Carnage Carnage is offline
 
Join Date: Jan 2005
what settings did you use for the ban?

this mod dosn't ban user accounts associated with a ban; only blocks that ip from accessing the site. If its the only ip the user uses, then they won't be able to post, if they have several ips then yes, they will still be able to post.
__________________
www.giveupalready.com

If you want/need to contact me, best thing is to pm me on that site, username Carnage.
Reply With Quote
  #102  
Old 18 Feb 2010, 12:45
Cynicz Cynicz is offline
 
Join Date: Jun 2009
A handy little mod, had to tweak ipbans.php for mySWLi but besides that a pretty smooth install.

One issue I am having though is enabling the registration option doesn't work, the registration field in the IP ban list stays at "No" and still functions as a blanket ban for anyone in the specified IP range.

I can manually issue a SQL query to set the "registration" value to 1 which causes the Reg ban to function and sets "No" to "Yes" in the ipban list although I'd prefer avoiding that extra step every time I ban a range of spambots.

(vBulletin 3.8.4 Patch Level 2)

Last edited by Cynicz; 18 Feb 2010 at 15:08. Reason: Additional details.
Reply With Quote
  #103  
Old 18 May 2011, 00:20
bigwest bigwest is offline
 
Join Date: May 2003
I really need this mod but for some reason it doesn't work for me or maybe it does but I don't understand it.

If I add the IP address:184.11.244.2

It bans the IP address: 126.255.255.255

Why is that?

(I altered those IP addresses just a little)
__________________
Big West Racing
Reply With Quote
  #104  
Old 30 Jun 2011, 00:54
kevinh kevinh is offline
 
Join Date: May 2007
Thanks for this wonderful add-on.

A quickquestion if I may - what does a person from a blocked IP see? do they just get a "cannot display this page" type error or do they actually see the "Reason" if one is entered in admincp ?

Also, one suggestion for future versions - a feature enabling banning of a whole country using a two letter code (e.g PK)

I use a firewall (CSF) on our cpanel server which includes this feature, although it applies to all sites across the server which often isn't desireable.

Last but not least, I find this site really useful for finding CIDR ranges - http://software77.net/geo-ip/ (I am not associated with the site in any way, I just use it).
Reply With Quote
  #105  
Old 16 Sep 2011, 23:47
HFB HFB is offline
 
Join Date: Mar 2008
Originally Posted by Cynicz View Post
A handy little mod, had to tweak ipbans.php for mySWLi but besides that a pretty smooth install.

One issue I am having though is enabling the registration option doesn't work, the registration field in the IP ban list stays at "No" and still functions as a blanket ban for anyone in the specified IP range.

I can manually issue a SQL query to set the "registration" value to 1 which causes the Reg ban to function and sets "No" to "Yes" in the ipban list although I'd prefer avoiding that extra step every time I ban a range of spambots.

(vBulletin 3.8.4 Patch Level 2)
Same problem here. Can you tell me the sql query you use to change it?

never mind i figured it out
update ipban set registration = 1

Last edited by HFB; 17 Sep 2011 at 20:35.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Mod Options

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


New To Site? Need Help?

All times are GMT. The time now is 20:56.

Layout Options | Width: Wide Color: