After using cloudflare I can't BAN IP's any longer, any solutions?

fionix

Well-known member
Hello,

After I switched DNS to cloudflare and used them to avoid the servers IP revealed it's not possible any longer to see each users IP address not to BAN a particular IP from a user without risking to BAN tons of users with the same IP.

The problem is that they all come in with cloudflares IP now.

Is there any easy or simple solution to this?

Your help is much appreciated.
 
  1. open library/config.php
  2. At the end, add:
    Code:
    if (isset($_SERVER['HTTP_CF_CONNECTING_IP'])) { $_SERVER['REMOTE_ADDR'] = $_SERVER['HTTP_CF_CONNECTING_IP']; }
  3. upload and overwrite
 
quick question.. do I need to force all users to be logged out to make sure they don't keep sharing the same IP ?
 
quick question.. do I need to force all users to be logged out to make sure they don't keep sharing the same IP ?

No you just do what @ozzy47 suggested.

However that doesn't work for everyone so if you have any issues there's something called "mod_cloudflare" that is an apache add-on you can install. It's actually quite easy to install and this is what I personally use. Nothing is required after installation except for restarting apache.

You can view more information on how to install it on this page.

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