Anyone running CloudFlare with XenForo

PumpinIron

Well-known member
Is anyone successfully running CloudFlare with XenForo? If so, is there anything I need to do / know about to get it working properly?

I found this article on the CloudFlare website:
https://support.cloudflare.com/hc/en-us/articles/202034110-Using-Cloudflare-with-Xenforo-forums

It mentions using this add-on:
https://xenforo.com/community/resources/solidmean-cloudflare-detect.1595/

Problem is, that add-on hasn't been updated since 2016, which makes me think it's no longer supported.

In addition, in the discussion on that add-on, @SneakyDave said this:

"Nginx and Apache have modules that are better suited to assign the correct ip than what this add-on does."

Of course that's very vague, and I'm not entirely sure how to go about this.

I'd like to use CloudFlare, but I want to make sure I have it setup correctly.
 
Last edited:
That CloudFlare add-on is to obtain the "real visitor IP" as Eva2000 indicates. It can be used if your web server doesn't support the real visitor IP coming from CloudFlare. Your host would know if it does.

The addon still works, but for XF 1.5. I thought somebody was going to port it to XF 2.x but I can't find it at the moment.
 
Read this article. I do not suggest installing a third party add-on for logging visitors IPs. You can and it works for some people but the better option in my personal opinion is to install mod_cloudflare if you have apache. If you have Nginx then this won't work but is the more viable and easier option for most users.

It does the exact same thing and logs visitors IPs but instead of an add-on is a simple apache module for cloudflare. Follow the instructions on this page:

https://www.cloudflare.com/technical-resources/

Also for ipv6 ips showing up as an ip address all together I recommend enabling pseudo ipv4 to "overwrite headers" under Network settings after installing the module. This will give a fake but unique ipv4 address to all ipv6 ips that come to your site in case one day you need to ban an ip and have no real way to do it. This will make it easier to do that.

It takes a small amount of time to take effect but works just fine.

I recommend these steps to anyone. I have tried using an add-on at first and while it works for some people it caused me a lot of trouble. When I can simply open PuTTy and type a few commands and have the ips show that easily then that's the reason I chose this route. It's a lot easier in my opinion.

Good luck.
 
Back
Top Bottom