UBB.Dev
Posted By: arentzen Dynamic banning - 01/11/2007 8:34 PM
Hej
Im running threads 6.0.1, and im looking for a way to use dynamic banning or IP block range. I can only ban a full Ip address; the Ip block range feature with % and _ doesnt work.
Posted By: AllenAyres Re: Dynamic banning - 01/12/2007 2:21 AM
Hey Peter, is it not possible to upgrade? There are a large number of security holes in the older stuff that aren't going to be fixed, would seem like ip banning would be the least of your concerns smile

Barring that, I would just compare the ip banning code blocks from your version and 6.5.5.
Posted By: arentzen Re: Dynamic banning - 01/12/2007 3:14 PM
Dear Allen
I will upgrade at some time. But I wont upgrade just because the platform has to be new. I still got around 20-25% users using 56k modems, so the platform may not become too heavy to upload. I had spend time closing security holes and made ehancements. I have only been hacked 1 time since we started up in 2002.

Anyway. Last week I opened some of my forums for anonymous posting, and I must realize the world is full of spammers, but I have decided to fight em', so this night I have made a little, but very effective programcode, which can ban Ip ranges. I have uploaded it into my ubbt.inc.php file right after check_ban function. Here it is:
PHP Code

//##########################################################
//Ny ban - af Arentzen
//##########################################################
// Adresser der skal bannes.
$omraade = array('0'=>'148.233',
'1'=>'201.20',
'2'=>'149.9',
'3'=>'201.20',
'4'=>'165.228',
'5'=>'201.',
'6'=>'212.168.34',
'7'=>'222.',
'8'=>'59.93',
'9'=>'59.94',
'10'=>'59.95',
'11'=>'203.144',
'12'=>'212.138',
'13'=>'221.208',
'14'=>'218.',

);

// Check IP adressen.
foreach($omraade as $liste){
if(
strstr($_SERVER['REMOTE_ADDR'], $liste)){
$html = new html;
$html -> not_right("{$ubbt_lang['YOU_BANNED']}: $Reason", $Cat);
exit();
}
}



Beware! If banning e.g only the number '222',every user with 222 somewhere in their ip adress will be banned, so use this code with care.
Posted By: Gizmo Re: Dynamic banning - 01/12/2007 3:42 PM
I use something that provides similar functionality on my site; i generally just use it for blocking spambots, but could be added to theubb with an include.

One thing to give thought to with an upgrade; UBB.Threads 7.1 comes with a captcha system for both Registration and Guest Posting; which would make "fly by posting" by automated tools pretty much thwarted.
© UBB.Developers