Skip to content

Latest commit

 

History

History
59 lines (45 loc) · 1.31 KB

transform_geoip.md

File metadata and controls

59 lines (45 loc) · 1.31 KB

Transformer: GeoIP Support

GeoIP maxmind support feature. The country code can be populated regarding the query IP collected. To enable this feature, you need to configure the path to your database.

See Downloads maxmind page to get the database.

Options:

  • mmdb-country-file (string)

    path file to your mmdb country database

  • mmdb-city-file (string)

    path file to your mmdb city database

  • mmdb-asn-file (string)

    path file to your mmdb asn database

  • lookup-ecs (bool)

    lookup for about the original client IP (or part of it) if provided

transforms:
  geoip:
    mmdb-country-file: "/GeoIP/GeoLite2-Country.mmdb"
    mmdb-city-file: ""
    mmdb-asn-file: ""
    lookup-ecs: false

When the feature is enabled, the following json field are populated in your DNS message:

  • continent
  • country-isocode
  • city
  • as-number
  • as-owner

Example:

{
  "geoip": {
    "city": "-",
    "continent": "-",
    "country-isocode": "-",
    "as-number": "1234",
    "as-owner": "Orange"
},

Specific directives added:

  • geoip-continent: continent code
  • geoip-country: country iso code
  • geoip-city: city name
  • geoip-as-number: autonomous system number
  • geoip-as-owner: autonomous system organization/owner