Splunk Search

There are sites that provide geolocation of IPs. Is there a way to create a Splunk form for this function? Does the ip address in question need to be indexed somewhere prior?

scott_sackrider
Explorer

Rather than use 3rd party websites, we'd like to use Splunk to geolocate an address that may not yet be indexed. Similarly, we have many network ranges, so we'd like to search an arbitrary address to find at which of our locations it resides. The ranges are in an index, but not all gazillion addresses we own.

1 Solution

dwaddle
SplunkTrust
SplunkTrust

Splunk has the existing "| iplocation" command which does this at search time using its local copy of Maxmind's "free" GeoLite2 database.

With the correct scripting tools, it's "not difficult" to add your own ranges to the GeoLite2 database and have them show up in the output of the "| iplocation" command just like any external IPs might.

Also, a simple XML dashboard to make arbitrary lookups using Splunk's iplocation command is not at all difficult either. In fact, give https://gist.github.com/duckfez/bea451c41be8c2db9fb20647eef4592f a try.

alt text

View solution in original post

0 Karma

dwaddle
SplunkTrust
SplunkTrust

Splunk has the existing "| iplocation" command which does this at search time using its local copy of Maxmind's "free" GeoLite2 database.

With the correct scripting tools, it's "not difficult" to add your own ranges to the GeoLite2 database and have them show up in the output of the "| iplocation" command just like any external IPs might.

Also, a simple XML dashboard to make arbitrary lookups using Splunk's iplocation command is not at all difficult either. In fact, give https://gist.github.com/duckfez/bea451c41be8c2db9fb20647eef4592f a try.

alt text

0 Karma

scott_sackrider
Explorer

Not only did that work.. it's fast.. Thanks!

0 Karma
Get Updates on the Splunk Community!

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer at Splunk .conf24 ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

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