MyBB Community Forums

Full Version: Cloudflare IP instead of server IP
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,so this is an unusual problem.As often the problem is that the cloudflare IP is instead of user IPs,but this time my server IP is changed to cloudflare IP.

So I need to set up this one thing and it connects to check if the right IP is trying to connect and I get an error that my IP is not allowed and that my IP is "173.245.53.158" (cloudflare IP).

Does anyone knows how could I fix this?

Thanks.
My CloudFlare Manager plugin specifically fixes this issue.

http://mods.mybb.com/view/cloudflare-manager
Just tried it out,and it didn't fixed my problem.
You can also change a setting in the ACP if you don't want to install the plugin (even though it's amazing)

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

It will only work for future visits, visits that have already happened will still use CloudFlare's IPs.
(2013-01-17, 06:58 PM)Paul H. Wrote: [ -> ]You can also change a setting in the ACP if you don't want to install the plugin (even though it's amazing)

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

It will only work for future visits, visits that have already happened will still use CloudFlare's IPs.

This setting is ON already.

I am also using Varnish on my server. (if this makes any difference)
(2013-01-17, 07:01 PM)Cipas Wrote: [ -> ]I am also using Varnish on my server. (if this makes any difference)
If varnish doesn't pass the correct IP to the webserver, MyBB has no chance to detect the real ip...
Strange,I just noticed that the IP "173.245.53.158" is not in the list of cloudflare Ips: https://www.cloudflare.com/ips


(2013-01-17, 07:24 PM)StefanT Wrote: [ -> ]
(2013-01-17, 07:01 PM)Cipas Wrote: [ -> ]I am also using Varnish on my server. (if this makes any difference)
If varnish doesn't pass the correct IP to the webserver, MyBB has no chance to detect the real ip...

I am still looking for solution on google,do you think this might help? http://danielmiessler.com/blog/getting-r...nd-varnish
If you run Varnish the scrutinize may not work because global $_SERVER vars may be different. You'll need to alter the get_ip() function in inc/functions.php to adjust to varnish.