Logging Real Visitor IP Addresses: mod_cloudflare for Apache httpd
Because Cloudflare acts as a proxy, you will notice changes to the way that your website visitors’ IP addresses are displayed both in your server logs and web applications – notably that all access appears to be coming from Cloudflare IP addresses. You can read more about the reasons for this in our knowledge base article.
You can change this behavior and log & display the actual visitor IP addresses by using mod_cloudflare.
Download appropriate Debian .deb file from https://www.cloudflare.com/technical-resources/#mod_cloudflare
wget https://www.cloudflare.com/static/misc/mod_cloudflare/debian/mod_cloudflare-jessie-amd64.latest.deb dpkg -i mod_cloudflare-jessie-amd64.latest.deb
Joel G Mathew, known in tech circles by the pseudonym Droidzone, is an opensource and programming enthusiast.
His favorite pastime is grappling with GNU compilers, discovering newer Linux secrets, writing scripts, hacking roms, and programs (nothing illegal), reading, blogging. and testing out the latest gadgets.
When away from the tech world, Dr Joel G. Mathew is a practising ENT Surgeon, busy with surgeries and clinical practise.