MyBB Community Forums

Full Version: Some banned IP's not banned.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hi,

I'm having an issue were banned IP's (Banning Admin CP) are able to view forms even though they are added the Admin CP "Banning" list.

Here is a screen shot of two 'Softlayer' IP's viewing forums after being added to the Admin CP 'Banning' list.

[attachment=30716]

Not sure whats going on here.

- Rich -
Those are only GUESTS not actually logged in users you have nothing to worry about!
Really?

So Banning an IP really does what then? I was under the impression that banning in Admin CP banned them as guest as well. So that is not the case?

If IP's are just blocked from registering then Banning in Admin CP should be expanded to all groups and block them from viewing the board. It's a hassle adding them manually to .htaccess .

- Rich -
Banning an IP address doesn't stop them from accessing your forum, just from using it.
Right on.. Thanks.

It would be awesome to have an .htaccess plugin that would allow you to add IP's .

- Rich -
Why would you need a plugin for this? It's just a matter of adding one line to file instead of ACP...
$ip_banned = array("218.248.255.145", "61.1.96.71", "196.168.1.1"); // example banned ip array
if(in_array($_SERVER['REMOTE_ADDR'],$ip_banned)){die("Sorry, you are banned here.");}
Quote:Why would you need a plugin for this? It's just a matter of adding one line to file instead of ACP...
Normally I would just add IP's I want to block via IP Deny in cPanel. But every time I do it messes up my .htaccess so that the board just slows to a crawl. Adding it manually is a hassle and It's easier to just add ranges if you can find a good IP range list. Plus being a developer time is at a premium. It would also be a convince to be able ban right from the board to .htaccess for bots I see in who is online as I monitor this screen during the day.

My site runs completely under/within MyBB (www.phoenixusc.com) and having a Admin banning option that is an inclusive ban, banning access to the board is preferable to me and helps shrink down a bloated .htaccess file.

Quote:$ip_banned = array("218.248.255.145", "61.1.96.71", "196.168.1.1"); // example banned ip array
if(in_array($_SERVER['REMOTE_ADDR'],$ip_banned)){die("Sorry, you are banned here.");}
Can you elaborate on this?

Thanks,
- Rich -
Nothing to elaborate. Add these two lines in global.php,line 102, after

$plugins->run_hooks("global_start");

Remember changing the ip addresses in first line to the ips you wanna block, separated by ','
I guess it will work.
Cool.

This would really rock if I could fill the array via a text file of IP addresses. I will play with this a bit today.

- Rich -
Pages: 1 2