How to track IP user end-visitors for free?

Greetings.

I found that (True-Client-IP) service is for enterprise plan only and I need a free solution to track IP visitor for my graduation project with Cloudflare,
https://dash.cloudflare.com/e3b9563e58060df99cad2e07cc2aca23/mini-soc.com/network

I found another link that describes how to enable track IP visitor on apache2 server with some repositories from Cloudflare, So is that possible if I configure it on my backend server?

Here is the reference to what I meant at the last:
https://support.cloudflare.com/hc/en-us/articles/203656534-How-do-I-restore-original-visitor-IP-with-Apache-2-4-

Could anyone help me, please?

Every request comes with the following two headers by default:
X-Forwarded-For
CF-Connecting-IP

You should be able to incorporate that header in your software for tracking user IP addresses. Or one of the below methods:

https://support.cloudflare.com/hc/en-us/sections/200805497-Restoring-Visitor-IPs

2 Likes

Actually I’m using apache2 running on my server, I’ve seen that rules but I need to make sure if it’s applicable before I start configure it.

Am I right?

Works just fine with Apache 2, it can be configured in every web server, those rules apply for Apache 2.

https://support.cloudflare.com/hc/en-us/articles/203656534-How-do-I-restore-original-visitor-IP-with-Apache-2-4-

1 Like

While true, it’s mainly so that customers who previously used a different CDN would not have to change anything on the backend, as that header is used by a major CDN. It’s the same as CF-Connecting-IP, which is in every request.

I tend not to use XFF in your scenario as it is not always a single client IP, and can be a chain of IPs you need to process.

The link by @matteo is generally the quickest and most reliable to get the correct outcome.

Is there something that could be used for Nginx? Thanks.

Same page posted before.

https://support.cloudflare.com/hc/en-us/articles/200170706-How-do-I-restore-original-visitor-IP-with-Nginx-

2 Likes

Thank you so much!

1 Like

So, if I understand correctly CF-Connecting-IP has the client IP even if it’s for a free account. Am I right?

Already answered earlier.

That is correct.

https://support.cloudflare.com/hc/en-us/articles/200170986-How-does-Cloudflare-handle-HTTP-Request-headers-

1 Like

Thanks.

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