Hi there,
am using Cloud Flare's security for my website. But the problem is, the IP of the user, whenever I click
LOGGED on post, shows the random IP ranges from cloud flare's network.
I don't know well how to solve this and show the REAL IPs.
Labrocca uses this thing I guess, maybe have any idea Labrocca?
Targeted version is 1.6.3 okay so next version after the version released just before a day (on 17th April) ?
Can I apply it now by replacing it with:
http://dev.mybb.com/projects/mybb/reposi.../index.php
file?
Thanks.
No, this doesn't seem to solve, gave me error.
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']))
4. Go to line 2792
5. Replace
$ip = $_SERVER['REMOTE_ADDR'];
With
$ip = $_SERVER['HTTP_CF_CONNECTING_IP'];
Okay this might solve for now, I tried, it works on new IP.
But the old ones that are logged are showing the old IPs only, oh well,thanks man this helped.
Already logged IPs won't change.
(2011-04-19, 05:41 AM)labrocca Wrote: [ -> ]Already logged IPs won't change.
Hmm, yeah well, thanks buddy.
I changed the below lines on my functions.php in version 1.63 and it did not work for me. The IP addresses are still from cloudflare, the new ones AFTER changing (I am aware it will not change the IP's already logged).
Any ideas?
(2011-04-18, 06:31 PM)Malcolm. Wrote: [ -> ]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']))
4. Go to line 2792
5. Replace
$ip = $_SERVER['REMOTE_ADDR'];
With
$ip = $_SERVER['HTTP_CF_CONNECTING_IP'];
It did solved for me that time.
However, now for current time, I don't use it.
What kind of server are you using? Installing
mod_cloudflare might be a better option. One of the drawbacks of placing code snippets in are that (a) they might need to be updated if the software changes, and (b) CloudFlare can't help troubleshoot (we don't create most of the workarounds).