Mod_cloudflare

Hi,

In past we have to use these lines in mod_cloudflare

LoadModule cloudflare_module modules/mod_cloudflare.so

<IfModule mod_cloudflare.c>
       CloudFlareRemoteIPHeader CF-Connecting-IP
       CloudFlareRemoteIPTrustedProxy 173.245.48.0/20 103.21.244.0/22 103.22.200.0/22 103.31.4.0/22 141.101.64.0/18 108.162.192.0/18 190.93.240.0/20 188.114.96.0/20 197.234.240.0/22 198.41.128.0/17 162.158.0.0/15 104.16.0.0/12 172.64.0.0/13 131.0.72.0/22 
       CloudFlareRemoteIPTrustedProxy 2400:cb00::/32 2606:4700::/32 2803:f800::/32 2405:b500::/32 2405:8100::/32 2a06:98c0::/29 2c0f:f248::/32
       # DenyAllButCloudFlare
</IfModule>

Today I removed all the line except the load module line

LoadModule cloudflare_module modules/mod_cloudflare.so

It is still giving the right logs in access_log. Do we need to have those earlier lines?

Regards

Unless you are still on Apache 2.2 I’d generally advise to switch to mod_remoteip instead.

I am on Apache 2.4 and I have remoteip too installed

[[email protected] ]# httpd -M|grep “remoteip”
remoteip_module (shared)
[[email protected] ]#

Just dont know how to use it. Can you suggest.

What are the benefits of using mod_remoteip over mod_cloudflare?

Now I find the method

RemoteIPHeader CF-Connecting-IP
RemoteIPTrustedProxy 103.21.244.0/22
RemoteIPTrustedProxy 103.22.200.0/22
RemoteIPTrustedProxy 103.31.4.0/22
RemoteIPTrustedProxy 104.16.0.0/12
RemoteIPTrustedProxy 108.162.192.0/18
RemoteIPTrustedProxy 131.0.72.0/22
RemoteIPTrustedProxy 141.101.64.0/18
RemoteIPTrustedProxy 162.158.0.0/15
RemoteIPTrustedProxy 72.64.0.0/13
RemoteIPTrustedProxy 173.245.48.0/20
RemoteIPTrustedProxy 188.114.96.0/20
RemoteIPTrustedProxy 190.93.240.0/20
RemoteIPTrustedProxy 197.234.240.0/22
RemoteIPTrustedProxy 198.41.128.0/17
RemoteIPTrustedProxy 2400:cb00::/32
RemoteIPTrustedProxy 2405:8100::/32
RemoteIPTrustedProxy 2405:b500::/32
RemoteIPTrustedProxy 2606:4700::/32
RemoteIPTrustedProxy 2803:f800::/32
RemoteIPTrustedProxy 2c0f:f248::/32
RemoteIPTrustedProxy 2a06:98c0::/29

Should I be writing all cloudflare IP range in RemoteIPTrustedProxy?

mod_remoteip is a standard module of Apache, whereas mod_cloudflare is a third party module which, furthermore, is not supported any longer.

This topic was automatically closed after 14 days. New replies are no longer allowed.