Splunk Search

Why is iplocation showing incorrect data ?

zacksoft_wf
Contributor

In my ES App, I have a rule where I noted some discrepancy regarding the source country for the src  ip  112.196.162.127.

Using 'iplocation'  command in SPL it shows as Turkey.
But in whoisdomaintools it shows as India.
112.196.162.127 IP Address Whois | DomainTools.com

Any suggestion why this is the case ?






0 Karma

richgalloway
SplunkTrust
SplunkTrust

It's possible the MaxMind database (source for the iplocation command) is outdated.  What version of Splunk are you using?  Have you tried updating the database (see https://docs.splunk.com/Documentation/Splunk/8.1.3/SearchReference/Iplocation#Updating_the_MMDB_file for instructions)?

---
If this reply helps you, Karma would be appreciated.
0 Karma

zacksoft_wf
Contributor

I noticed something,
In my query if I write like this I get wrong iplocation data

index=palo_alto_networks TERM(112.196.162.127)
| table _time, sourcetype, src, local_ip Country user_name 
| iplocation  src

But if, I change the iplocation comands position to the middle , it gives the correct country data
like this

index=palo_alto_networks TERM(112.196.162.127)
| iplocation  src
| table _time, sourcetype, src, local_ip Country user_name 



0 Karma

richgalloway
SplunkTrust
SplunkTrust

The first query tries to display the Country field before iplocation has created it, so it's no surprise it doesn't show expected results.

---
If this reply helps you, Karma would be appreciated.
0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Splunk Lantern’s Guide to The Most Popular .conf25 Sessions

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Unlock What’s Next: The Splunk Cloud Platform at .conf25

In just a few days, Boston will be buzzing as the Splunk team and thousands of community members come together ...

Index This | How many sevens are there between 1 and 100?

August 2025 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with this ...