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 codegeoip-country
: country iso codegeoip-city
: city namegeoip-as-number
: autonomous system numbergeoip-as-owner
: autonomous system organization/owner