# Using the geoip filter with commercial databases

**URL:** <https://discuss.elastic.co/t/using-the-geoip-filter-with-commercial-databases/321874>\
**Category:** Logstash\
**Created:** [December 22, 2022, 9:57pm UTC](https://discuss.elastic.co/t/using-the-geoip-filter-with-commercial-databases/321874 "2022-12-22T21:57:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![patam](https://avatars.discourse-cdn.com/v4/letter/p/bbce88/32.png) [@patam](https://discuss.elastic.co/u/patam)\
**Post date:** [December 22, 2022, 9:57pm UTC](https://discuss.elastic.co/t/using-the-geoip-filter-with-commercial-databases/321874/1 "2022-12-22T21:57:33Z")

</div>

I am trying to use the commercial Anonymous IP database for the geoip filter and I'm not sure how to retreive the information from the database. I have Logstash updating the db and the right .mmdb is there I am just unsure about how to get the information though the geoip filter for that db. Can anyone point me in the right direction? all the examples in the plugin doc are for the basic databases

---

<div class="post-metadata">

**Author:** ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)\
**Post date:** [December 22, 2022, 11:42pm UTC](https://discuss.elastic.co/t/using-the-geoip-filter-with-commercial-databases/321874/2 "2022-12-22T23:42:23Z")

</div>

I'm not sure this database is supported, at least I see no referente to it in the [code](https://github.com/logstash-plugins/logstash-filter-geoip/blob/099f1fdc659d205906cd79487c253609e57eadb4/src/main/java/org/logstash/filters/geoip/GeoIPFilter.java#L48-L61).

```auto
// The free GeoIP2 databases
  private static final String CITY_LITE_DB_TYPE = "GeoLite2-City";
  private static final String COUNTRY_LITE_DB_TYPE = "GeoLite2-Country";
  private static final String ASN_LITE_DB_TYPE = "GeoLite2-ASN";

  // The paid GeoIP2 databases
  private static final String CITY_DB_TYPE = "GeoIP2-City";
  private static final String CITY_AFRICA_DB_TYPE = "GeoIP2-City-Africa";
  private static final String CITY_ASIA_PACIFIC_DB_TYPE = "GeoIP2-City-Asia-Pacific";
  private static final String CITY_EUROPE_DB_TYPE = "GeoIP2-City-Europe";
  private static final String CITY_NORTH_AMERICA_DB_TYPE = "GeoIP2-City-North-America";
  private static final String CITY_SOUTH_AMERICA_DB_TYPE = "GeoIP2-City-South-America";
  private static final String COUNTRY_DB_TYPE = "GeoIP2-Country";
  private static final String ISP_DB_TYPE = "GeoIP2-ISP";
  private static final String DOMAIN_DB_TYPE = "GeoIP2-Domain";

```

There is an old [pull request](https://github.com/logstash-plugins/logstash-filter-geoip/pull/141) to add support to the Anonymous database, but it was never merged.

---

<div class="post-metadata">

**Author:** ![patam](https://avatars.discourse-cdn.com/v4/letter/p/bbce88/32.png) [@patam](https://discuss.elastic.co/u/patam)\
**Post date:** [December 23, 2022, 3:11pm UTC](https://discuss.elastic.co/t/using-the-geoip-filter-with-commercial-databases/321874/3 "2022-12-23T15:11:52Z")

</div>

Thank you for your help!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [January 20, 2023, 3:12pm UTC](https://discuss.elastic.co/t/using-the-geoip-filter-with-commercial-databases/321874/4 "2023-01-20T15:12:35Z")

</div>

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