• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

HELP ASAP HELP ASAP I BAN 1 IP THEN EVERYONE GOT BANNED WTF !!!!

#1
Hey, so i ban 1 ip address.

Well, after that, ALL of my users are banned, including me !

This is the ip. 120.89.91.69

Oddly, all of my members have that ip at the top of their ip list.

What the heck ? How can i unban that ip ? There is no option for unban ip.

Please this is serious how an this bug exist at xenforo !
 

Jake Bunce

XenForo moderator
Staff member
#2
You can clear all banned / discouraged IPs by running these queries on your database:

Code:
TRUNCATE TABLE xf_ip_match;

DELETE
FROM xf_data_registry
WHERE data_key = 'bannedIps';
Optionally, if you wish to only delete a specific banned IP:

Code:
DELETE
FROM xf_ip_match
WHERE ip = '12.44.55.22';

DELETE
FROM xf_data_registry
WHERE data_key = 'bannedIps';
 

Jake Bunce

XenForo moderator
Staff member
#4
As for the problem of all users having the same IP... your server is probably behind a proxy that is messing up IP reporting.

Visit admin.php?tools/phpinfo and make sure REMOTE_ADDR shows your correct IP. If it's not correct then you can contact your host or server person to fix this. Or look for a server variable that contains the correct IP and then add this code to your library/config.php file:

Code:
// FIX IP ADDRESS FOR PROXY
$_SERVER['REMOTE_ADDR'] = $_SERVER['HTTP_X_REAL_IP'];
Replace the red part with the name of the server variable that contains the correct IP (from your phpinfo).
 

SneakyDave

Well-known member
#5
Are you using Cloudflare? There are only a few IP's that'll register for visitors if you're using that and not using one of the CLoud Flare addons to get the visitirors "real" IP.

Whoops, should have checked the IP beforehand, it isn't a Cloud Flare IP
 

Contex

Well-known member
#6
I had the same issue, was using CloudFlare.

I solved it simliar to how Jake Bunce did it.

PHP:
if (isset($_SERVER['HTTP_CLIENT_IP'])) {
    $_SERVER['REMOTE_ADDR'] = $_SERVER['HTTP_CLIENT_IP'];
} else if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {
    $_SERVER['REMOTE_ADDR'] = $_SERVER['HTTP_X_FORWARDED_FOR'];
} else if (isset($_SERVER['HTTP_X_REAL_IP'])) {
    $_SERVER['REMOTE_ADDR'] = $_SERVER['HTTP_X_REAL_IP'];
}