How to restore the original visitor IP with XenForo

Created at:
Avatar
Updated

Since the Incapsula servers are the point of access which is seen by the hosting server, the Incapsula IP ranges appear as the incoming IP in the requests.

If you wish to log the original end-user IP for each request using XenForo, the X_Forwarded_For header should be monitored, as described in these quick steps:

1) Open library/config.php

2) At the end, add:

if (isset($_SERVER['HTTP_X_FORWARDED_FOR']))
{
$_SERVER['REMOTE_ADDR'] = $_SERVER['HTTP_X_FORWARDED_FOR'];
}

3) Upload
4) Overwrite

Was this article helpful?
3 out of 4 found this helpful
Have more questions? Submit a request

Comments

  • Avatar
    Sam Pick

    it works thank you;)

  • Avatar
    TimWare

    it works! nice :D

Powered by Zendesk