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: 1338
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:	2138
Size:	39.7 KB
ID:	85478   Click image for larger version

Name:	ss2.JPG
Views:	1692
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

  #76  
Old 02 Jun 2009, 11:54
mrspring mrspring is offline
 
Join Date: Apr 2008
Same problem here.. mad numbers for the duration, and new bans appear as 0.0.0.0 in the list.. this is new behaviour, there are bans in the list made on the .2a revision that are coherent..

this is ver 3.7.2, on a (shared) linux server..

edit: i should mention, this problem started BEFORE i upgraded from ver .2a, i imagined the upgrade would fix it, but it did not.
Reply With Quote
  #77  
Old 02 Jun 2009, 13:31
CILGINKRAL_'s Avatar
CILGINKRAL_ CILGINKRAL_ is offline
 
Join Date: May 2007
Real name: ALP
hmm. I will definitely hurt. thanks
Reply With Quote
  #78  
Old 02 Jun 2009, 13:48
kapii kapii is offline
 
Join Date: May 2008
Arrow Advanced IP Ban Manager Error

Originally Posted by Carnage- View Post
re: ip ban against 194.8.0.0/8

I testeed this on my own board and it went through ok. (displaying a ban against 194.0.0.0 which is correct for /8)

can you tell me what versions of php/mysql you are running and if you are using 64 bit or 32 bit versions. I'm having issues tracking down the apparent random occurance of 0.0.0.0 bans...
Mine is not random... It happens every time I try to ban anything from 190 and up on the prefix number...

I'm using :
MySQL Version 5.0.77-community
PHP 5.2.5
Web Server Apache v1.3.41 (cgi)

I hope there is a way to fix this as the spammers and hackers are driving me nuts...

Thanks,
kapii
Reply With Quote
  #79  
Old 02 Jun 2009, 13:52
Andrewsha Andrewsha is offline
 
Join Date: Apr 2009
Hello!
I just remove UNSIGNED attribute in table and now everything is OK
Reply With Quote
  #80  
Old 10 Jun 2009, 01:03
Carnage Carnage is offline
 
Join Date: Jan 2005
Originally Posted by Andrewsha View Post
The same problem with 0.0.0.0

Please try
array('ip'=>'194.158.64.0','cidr'=>'19','description'=>'Country'),
array('ip'=>'217.147.112.0','cidr'=>'20','description'=>'Country'),

You will see 0 in 'ip' column in "ipban"-table

'ip'-column has attribute 'UNSIGNED'
I've changed attribute. Set it empty. Now in db:
194.158.64.0 -> -1029816320
217.147.112.0 -> -644648960

But in admin panel "List IP Bans" this ip-addresses are not shown.
Thanks for this information, its very useful.

An ip address should be an unsigned int, however it would seem that some versions of php return a signed int instead hence the problem. I'll see if theres a better fix for this tommorow, however if not, changing the mysql field to signed will probably solve it.
__________________
www.giveupalready.com

If you want/need to contact me, best thing is to pm me on that site, username Carnage.
Reply With Quote
  #81  
Old 10 Jun 2009, 07:45
Andrewsha Andrewsha is offline
 
Join Date: Apr 2009
But in admin panel "List IP Bans" this ip-addresses are not shown
That was because I loaded ip-addresses with userid=-1.
And in admin panel I can see only addresses loaded by myself.
So it's OK now.
Reply With Quote
  #82  
Old 12 Jun 2009, 12:43
Carnage Carnage is offline
 
Join Date: Jan 2005
ipbans made by a userid not found in the user table will not be shown, this was by design.

I have found a nicer fix for the -ve values returned by long2ip; it will be appended to the first post shortly
__________________
www.giveupalready.com

If you want/need to contact me, best thing is to pm me on that site, username Carnage.
Reply With Quote
  #83  
Old 17 Jun 2009, 19:43
Mutt's Avatar
Mutt Mutt is offline
 
Join Date: Nov 2001
just updated but still having the same issue. when i add an ip to ban it gets written to the DB but does not dispaly when I click "list IP bans"
Reply With Quote
  #84  
Old 19 Jun 2009, 17:44
Carnage Carnage is offline
 
Join Date: Jan 2005
What userid is listed alongside the ban?
__________________
www.giveupalready.com

If you want/need to contact me, best thing is to pm me on that site, username Carnage.
Reply With Quote
  #85  
Old 29 Jun 2009, 19:38
vespillo vespillo is offline
 
Join Date: Jan 2009
I have installed this plugin on a vbulletin 3.8.3 forum, but I'm having a bit of trouble. The install went fine, and I can add new IPs to the ban list, but I cannot list current bans.

Whenever I click on "List IP Bans", I am met with an empty table and this error message:

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in [path]/admincp/ipbans.php on line 36

Any ideas?

Last edited by vespillo; 19 Aug 2009 at 22:17.
Reply With Quote
  #86  
Old 09 Jul 2009, 10:25
Carnage Carnage is offline
 
Join Date: Jan 2005
That suggests a mysql error in the preceeding query.

What version of mysql are you using?
__________________
www.giveupalready.com

If you want/need to contact me, best thing is to pm me on that site, username Carnage.
Reply With Quote
  #87  
Old 14 Jul 2009, 19:49
vespillo vespillo is offline
 
Join Date: Jan 2009
Originally Posted by Carnage- View Post
That suggests a mysql error in the preceeding query.

What version of mysql are you using?
5.0.51a
Reply With Quote
  #88  
Old 23 Jul 2009, 14:54
nonspin nonspin is offline
 
Join Date: May 2008
For those who cannot see added bans, check if mysqli is running.
I was playing around with it a few days ago and left it enabled, yesterday
i saw that all saved ipbans were gone (not showing in list).

it took me quiet some time to find out that

config.php

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

caused it..


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

.. and everything is fine
Reply With Quote
  #89  
Old 15 Aug 2009, 14:59
gmerin gmerin is offline
 
Join Date: Dec 2008
Originally Posted by nonspin View Post
.
that fixed the vanishing IPs and the "Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in [path]/diaf/ipbans.php on line 36" error.

Its a pity because mysqli is the preferred and more efficient way to call in php 5x
Reply With Quote
  #90  
Old 20 Aug 2009, 08:51
nonspin nonspin is offline
 
Join Date: May 2008
For those running mySQLi - here's the fix

in ipbans.php

find

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

replace

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

.. thanks for the pointer, gmerin
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 01:17.

Layout Options | Width: Wide Color: