Incorrect Geolocation ip

,

What is the name of the domain?

What is the error message?

Sorry, you have been blocked You are unable to access wessconnect.net

What is the issue you’re encountering

when applying Geoip block WAF rule cloudflare detect wrong country

What steps have you taken to resolve the issue?

Disable the GeoIP block WAF rule.

What feature, service or problem is this related to?

I don’t know

What are the steps to reproduce the issue?

Applying WAF rule block if geoip country is not Malaysia and Singapore.

access from Malaysia network IP address
IPv6: 2405:3800:8b3:f28e:311c:40fc:dd8e:b31f
IPv4: 27.125.250.169

Result: Cloudflare WAF blocked and event logs detected geoip country Indonesia.

using VPN switch to Singapre IP address,
Result: Cloudflare WAF still blocked and event logs detected geoip country Indonesia also.

Screenshot of the error

Cloudflare uses IPInfo for GeoIP.

The IPv4 country seems to be for Malaysia… 27.125.250.169 IP Address Details - IPinfo.io
But the IPv6 address comes up as Indonesia… 2405:3800:8b3:f28e:311c:40fc:dd8e:b31f IP Address Details - IPinfo.io

You can file corrections here…

@ipinfo

3 Likes

Hi @wenliang,

Thanks for the detailed explanation and IP samples — that really helps narrow things down.

This seems like a classic case of incorrect GeoIP resolution by Cloudflare’s WAF, which can occasionally happen due to:

  1. Outdated or incorrect IP-to-country mappings in Cloudflare’s GeoIP database.
  2. VPN or ISP routing quirks, especially in Southeast Asia, where IP blocks may be reallocated or shared between neighboring countries.
  3. Dual-stack (IPv4 + IPv6) detection mismatches, where one protocol is correctly detected and the other isn’t.

:wrench: Suggestions:

  1. Check both IPv4 and IPv6 detection in the WAF logs — sometimes the GeoIP detection differs per protocol.
  2. Open a Cloudflare support ticket and include:
  • Full IPs (as you did)
  • WAF Event ID or Ray ID
  • The actual country you are accessing from
  • Screenshot of WAF log showing incorrect GeoIP
  1. As a workaround, consider logging or allowing requests via IPv6 or adjusting the rule to only apply to IPv4 temporarily to test consistency.
  2. For long-term fix: Use Cloudflare Workers to implement custom logic that cross-verifies IP geolocation using a third-party API (like ipinfo.io or ip-api.com), if precision is critical for your application.
2 Likes

Hi there :waving_hand:

IPinfo DevRel here (We provide Cloudflare with IP geolocation data).

Please follow the instructions here: IPinfo is the IP geolocation data provider of Cloudflare - Announcement - IPinfo Community

If there are any issues, please ping me!


@sjr thank you very much for the ping! I appreciate it! :smiling_face:


@ahmad234

Use Cloudflare Workers to implement custom logic that cross-verifies IP geolocation using a third-party API (like ipinfo.io or ip-api.com), if precision is critical for your application.

Guess what :slight_smile: We will now be providing Cloudflare with their geolocation data. I will be here to address any issues we may have and push out fixes immediately. Cheers!

1 Like

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