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
-
mmdb-coordinate-file(string)path file to your mmdb city database (used for latitude/longitude)
-
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: ""
mmdb-coordinate-file: ""
lookup-ecs: false
When the feature is enabled, the following json field are populated in your DNS message:
continentcountry-isocodecityas-numberas-ownerlatlon
Example:
{
"geoip": {
"city": "-",
"continent": "-",
"country-isocode": "-",
"as-number": "1234",
"as-owner": "Orange",
"lat": 48.85836,
"lon": 2.29448
},
Specific directives added:
geoip-continent: continent codegeoip-country: country iso codegeoip-city: city namegeoip-as-number: autonomous system numbergeoip-as-owner: autonomous system organization/ownergeoip-lat: latitudegeoip-lon: longitude