1. 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 !!!!

Discussion in 'Troubleshooting and Problems' started by NicoMarpaunk, Jun 29, 2012.

  1. NicoMarpaunk

    NicoMarpaunk New Member

    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 !
     
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    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';
    
     
    CyclingTribe and Nasr like this.
  3. whynot

    whynot Well-Known Member

    Can you try to login from a different IP with a proxy?
     
  4. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    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).
     
    BentDreams and CyclingTribe like this.
  5. SneakyDave

    SneakyDave Well-Known Member

    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
     
  6. Contex

    Contex Well-Known Member

    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'];
    }
     
    BentDreams and Jake Bunce like this.

Share This Page