Visitor IP's and cloudflare

My cloudflare is setup using my personal account not infinityfree cloudflare.

Before anyone mentions my nameservers are pointed to cloudflare and hosting is fine, setup with my personal account and my hosting is fine.
I’m not sure if it’s something I have to do with cpanel or file manager or with cloudflare because all internet results are with apache and etc. When users access my website and create an account I log their ip addresses for security reason and not malicious reasons. But cloudflare seems to hide their addresses and when i ban them with that ip they can still access the site until i ban their DIRECT ip address which i cant get with cloudflare protection. How would i make the site use cloudflare but not hide visitor ip’s or atleast disable it for the register page because if people are unbannable on my site then theres no point on having rules.

for anyone also needing to fix this issue here is an article you should read on cloudflare:

If you can't install mod_cloudflare, or if there is no Cloudflare plugin available for your content management system platform to restore original visitor IP, add this code to your origin web server in or before the <body> tag on any page that needs the original visitor IPs:


This command will only make the IP address available to scripts that need it. It doesn’t store the IP in your actual server logs.`Preformatted text`
1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.