Skip to main content

Modsecurity showing Cloudflare IP and not origin ip address

Comments

1 comment

  • mtindor

    You can't block the "real" IPs that come through Cloudflare via CSF.    CSF only sees the actual CF IP addresses because CSF is working at a different level..   It's unfortunate.   I do block a few pesky IPs on a couple of sites behind cloudflare using the site's .htaccess file, but that is likely not going to be of help to you.  I'll show you an example in .htacess though that allows all but blocks 54.172.14.111

    <RequireAll>
        Require all granted
        Require not IP 54.172.14.111
    </RequireAll>

    You could probably do something similar in the Apache Include Editor, but it would all be manual and you wouldn't want to list thousands of IPs in it.

    0

Please sign in to leave a comment.