Previous Thread
Next Thread
Print Thread
Rate Thread
#312620 01/11/2007 1:34 PM
Joined: Oct 2006
Posts: 18
Newbie
Newbie
Joined: Oct 2006
Posts: 18
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.


trosfrihed.dk
Custom Ubb 7.5.2
Sponsored Links
arentzen #312629 01/11/2007 7:21 PM
Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
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?
Joined: Oct 2006
Posts: 18
Newbie
Newbie
Joined: Oct 2006
Posts: 18
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.


trosfrihed.dk
Custom Ubb 7.5.2
arentzen #312644 01/12/2007 8:42 AM
Joined: Jan 2000
Posts: 5,833
Likes: 20
UBBDev / UBBWiki Owner
Time Lord
UBBDev / UBBWiki Owner
Time Lord
Joined: Jan 2000
Posts: 5,833
Likes: 20
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 - Putting Dev into UBB.threads
Company: VNC Web Services - UBB.threads Scripts and Scripting, Install and Upgrade Services, Site and Server Maintenance.
Forums: A Gardeners Forum, Scouters World, and UGN Security
UBB.Threads: My UBB Themes, My UBB Scripts

Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
JAISP
JAISP
PA
Posts: 449
Joined: February 2008
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)