Skip to main content

IP Blocker is not working

Comments

6 comments

  • vacancy

    If your site is running behind Cloudflare, the IP restrictions you make here will be invalid.

    2
  • Ahmed Hamdy

    vacancy yes you are correct!

    Is there any workaround to block IPs using Cloudflare?

    0
  • cPRex Jurassic Moderator

    Good call on the Cloudflare block.

    There likely wouldn't be a good way to block those addresses with a simple .htaccess trick.  This might be a better question for Cloudflare directly as they would be able to let you know how to get the origin IP, or if that's even possible in your situation.

    0
  • Ahmed Hamdy

    It doesn't work even though I'm not using Proxies in Cloudflare!

    0
  • Ahmed Hamdy

    One of my customers is using another hosting company and he is using Cloudflare as well, but he doesn't face any issues with the IP blocking in htaccess file.

    Any workaround solution for that I can do in my server?

    0
  • vacancy

    The main reason for this problem is that the traffic does not reach your site directly, but reaches you from cloudflare cdn servers. Therefore, the IP addresses accessing your server are cloudflare IP addresses, not real IP addresses.

    You can see the real ips on the server with the mod_remoteip module, but blocking it will still be useless.

    There may be a special API system on the server you say is running, any blocks made from the server can automatically ban via API and Cloudflare. What you need to do is to perform IP bans via cloudflare waf.

    0

Please sign in to leave a comment.