Log in

View Full Version : Is there a module to Ban an IP ?


alt.id
02-03-2006, 12:37 PM
Hi,

I was visiting this :
https://vborg.vbsupport.ru/showthread.php?t=96834

But i need a module which can Ban an IP permanently or both ?
Please let me know if you do know one way ?

Other way that i found is like as folows below :
<?php
$banned_ip = array();
$banned_ip[] = '111.111.111.111';
$banned_ip[] = '111.111.111.112';
$banned_ip[] = '111.111.111.113';
$banned_ip[] = '111.111.111.114';

foreach($banned_ip as $banned) {
$ip = $_SERVER['REMOTE_ADDR'];
if($ip == $banned){
echo "You have been banned!";
exit();
}
}
// rest of PHP Script here!
?>
The script above is only to put in all pages.

I hope your better solution than that,
Thanks a lot.

.

hiiped
02-03-2006, 12:41 PM
I.P. banning is already built into VB

admincp >>> vbulletin options >>> user banning >>> second window will say
Banned IP Addresses
Use this option to prevent certain IP addresses from accessing any part of your board.

If you enter a complete IP address (242.21.11.7), only that IP will be banned.
If you enter a partial IP (243.21.11. or 243.21.11), any IPs that begin with the partial IP will be banned. For example, banning 243.21.11 will prevent 243.21.11.7 from accessing your board. However, 243.21.115.7 would still be able to access your board.

You may also use a * as a wildcard for increased flexibility. For example, if you enter 243.21.11*, many IPs will be banned including: 243.21.11.7, 243.21.115.7, 243.21.119.225.




go from there

alt.id
02-03-2006, 01:01 PM
Your details are very clear and clean,
Thanks a lot hiiped ;)

.