How do I restore original visitor IP with MyBB forums?

More recent versions of MyBB include a Scrutinize User's IP address option.

    Admin CP > Configuration > Server and Optimization Options > Scrutinize User's IP address? > Yes

Alternatively, you may install the [Cloudflare Management plugin](http://mods.mybb.com/view/antoligy-mybb-cloudflare-management-plugin) available for MyBB 1.6 (which does the same thing).

MyBB 1.6.0, 1.6.1, 1.6.2, or 1.6.3

  1. Navigate to ./inc/functions.php
  2. Go to line 2790
  3. Replace:
    if(isset($_SERVER['REMOTE_ADDR']))
    With
    if(isset($_SERVER['HTTP_CF_CONNECTING_IP']))
    Replace:
    $ip = $_SERVER['REMOTE_ADDR'];
    With:
    $ip = $_SERVER['HTTP_CF_CONNECTING_IP'];
Still not finding what you need?

The CloudFlare team is here to help. 95% of questions can be answered using the search tool, but if you can’t find what you need, submit a support request.

Powered by Zendesk