php forum
php mysql forum
php mysql smarty
 
Topic Options
#312620 - 01/11/07 12:34 PM Dynamic banning
arentzen Offline
Newbie

Registered: 10/05/06
Posts: 19
Loc: Denmark
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.
_________________________
Peter Arentzen
trosfrihed.dk

Top
#312629 - 01/11/07 06:21 PM Re: Dynamic banning [Re: arentzen]
AllenAyres Administrator Offline
I type Like navaho

Registered: 03/10/00
Posts: 25387
Loc: Texas
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.
_________________________
- Allen wavey
- What Drives You?

Top
#312643 - 01/12/07 07:14 AM Re: Dynamic banning [Re: AllenAyres]
arentzen Offline
Newbie

Registered: 10/05/06
Posts: 19
Loc: Denmark
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.
_________________________
Peter Arentzen
trosfrihed.dk

Top
#312644 - 01/12/07 07:42 AM Re: Dynamic banning [Re: arentzen]
Gizmo Administrator Online   shocked
Wizard

Registered: 01/10/00
Posts: 5102
Loc: Portland, OR, USA
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.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design Owner

Top


Moderator:  Ian_W 
Top Posters Last 30 Days
AllenAyres 56
Gizmo 23
sirdude 21
Zarzal 10
blaaskaak 8
Grymmie 4
Basil Fawlty 3
Who's Online
3 Registered (Basil Fawlty, GEN, sirdude), 48 Guests and 7 Spiders online.
Key: Admin, Global Mod, Mod
Shout Box

Latest Posts
PM Quota Checker
by Basil Fawlty
07/26/08 07:22 PM
[7.3+] CustomTag - Photobucket Slideshow
by AllenAyres
07/26/08 03:31 PM
Team UBBDev Rides Again!
by AllenAyres
07/26/08 03:28 PM
iPhone 3G
by AllenAyres
07/24/08 05:19 PM
[7.3.x] ubb.links
by AllenAyres
07/24/08 05:18 PM
[7.x] [Beta] Purge Welcome Messages
by Gizmo
07/23/08 06:58 PM
User Authentication Class
by Gizmo
07/21/08 07:07 PM
New Mods
[7.3+] CustomTag - Photobucket Slideshow
by Gizmo
07/12/08 11:14 AM
[7.3.x] Copy forum permissions
by blaaskaak
07/09/08 02:37 PM
Protect users emails
by Basil Fawlty
06/29/08 08:44 AM
[7.3.x] Scheduled board close for backup
by blaaskaak
06/26/08 04:01 AM
[7.3.x] ubb.links
by AllenAyres
06/20/08 11:50 PM
Newest Members
DarkMaster, nixadmin, Stanley, NazzaN, mmem700
13311 Registered Users

 

 

 
fusionbb message board php hacks