IIS 10 – CloudFlare Proxy Reversing (mod_remoteip or mod_cloudflare)

cloudflarephpbb

I have a forum running on my website which is using phpBB, but all users on it have a CloudFlare IP. This is not ideal at all and I would like to fix it.

After running a Google search and spending about an hour trying to solve the problem, there seems to be no possible way to use 'mod_remoteip' for IIS. It is only for Apache server.

Moving on, I decided to try 'mod_cloudflare' (which CloudFlare says it is not recommended to use, but obviously I don't have any other options). However, I have no idea how to actually install this and use it. How do I get it added to phpBB? There seems to be a PHP script I need to add, but I honestly have no idea what file to add it to so it works on all of the phpBB forum.

Please don't also recommenced the phpBB plugin called 'Cloudflare unmasked IP'. It doesn't work at all. All IP's are still CloudFlare IP's.

Thanks.

Best Answer

You should be able to achieve this out of the box with IIS 10. Please refer to the following article https://support.cloudflare.com/hc/en-us/articles/200170786-How-do-I-correct-visitor-IP-with-Microsoft-IIS- (Webserver Instructions > Microsoft IIS section)

Cloudflare Support article for IIS setup

See also https://docs.microsoft.com/en-us/iis/get-started/whats-new-in-iis-85/enhanced-logging-for-iis85