Best way to get location for an anonymized ip address

I have a WordPress plugin that stores information about failed login attempts. This information includes the IP address of the user. For GDPR Compliance the address is anonymized, so for example becomes, becomes and so on.

An admin can later get geolocation information for a failed login attempt using IPinfo. Currently the lookup is made using the anonymized address, i.e., but I’m unsure if that the best way and if the results are reliable?

Can the IP addresses in the range have different geolocation results, and if, is there a way to query the results for a range of ip-addresses and get multiple geolocation results?


First of all, thank you for posting on the community. Really appreciate that :slight_smile:

Can the IP addresses in the range have different geolocation results

Yes, IP address ranges can cover multiple geolocations.

In this case, definitely use the IPinfo CLI, particularly the summarize command. Here is a blog on this. The IPinfo CLI’s summarize command accepts IP address range inputs.

IPinfo Summarize

First, let’s look into summary level information of the range:


ipinfo ► ipinfo summarize


- Total   256
- Unique  256
- Anycast 0
- Bogon   0
- Mobile  0
- VPN     0
- Proxy   0
- Hosting 256
- Tor     0
- Relay   0

Top ASNs
- AS15169 Google LLC 256 (100.0%)

Top Usage Types
- Hosting 256 (100.0%)

Top Routes
- (AS15169) 256 (100.0%)

Top Countries
- Sweden  192 (75.0%)
- France  32 (12.5%)
- Germany 32 (12.5%)

Top Cities
- Stockholm, Stockholm, SE       192 (75.0%)
- Paris, Île-de-France, FR       32 (12.5%)
- Mörfelden-Walldorf, Hesse, DE  32 (12.5%)

Top Regions
- Stockholm, SE      192 (75.0%)
- Île-de-France, FR  32 (12.5%)
- Hesse, DE          32 (12.5%)

Top Domains
- 256 (100.0%)

From the input IP range, we can see 3 different cities and 3 different countries.

IPinfo Bulk/Batch lookup

Now, let’s say the IP address range is too big, and you need more granular information for each individual IP address. In that case, use CLI’s bulk command, which supports IP ranges as well.


ipinfo bulk -c > ip_result.csv

Output: ip_result.csv

This command will generate a CSV file containing information for each individual IP addressses.

Please let me know if you have any further queries. Happy to help!


Thanks for the answer @Abdullah. It answers all my questions :).


It is my pleasure. If you have any technical questions or any questions at all about our IP data, feel free to post again. :slight_smile: Thank you, cheers!

1 Like