Cf-iplatitude 37.75100 cf-iplongitude -97.82200 question


I am using cf-iplatitude and cf-iplongitude.
And I keep guessing what exactly I should when I receive
cf-iplatitude 37.75100
cf-iplongitude -97.82200
cf-ipcountry US

And I cannot find an answer for long period of time.

I think probably it is when geo database fails to give valid result.
Because when I tried to take IP address and check with node geoip-lite, I get no lat/long and I get country CA.

In my case I am trying to block non US traffic.
Do you think it is good idea to block based on those coordinates?

If you are going to block based on country, then I would make a WAF rule to only allow traffic for US and not use the GPS headers

1 Like

In my case I get country US, but I get strange coordinates cf-iplatitude 37.75100 cf-iplongitude -97.82200.
And it is not only one IP address, I get many of IP addresses with cf-iplatitude 37.75100
cf-iplongitude -97.82200 coordinates.
When I tried to check one of those IP address with node geoip-lite, I’ve got country CA, what is not US at all.
I am just trying to undestand first of all what it is.

Is it possible that means the state CA which is California, United States? That is where Cloudflare’s HQ is

coordinates point to Cheney Reservoir, Kansas

Also even if I filter by cf-ipcountry setting only US, I still see in Google Analitics small amount of users for example from Canada or India

1 Like

Cloudflare uses a 3rd party to determine user origin. It may not match to your 3rd party provider. IP addresses are ephemeral at best. Restricting access by geo-region is a guess. Is Cloudflare wrong? :person_shrugging: Is Google wrong? :person_shrugging: Yes!


well ok, got it, thanks

1 Like

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