Location detection plugin¶
This plugin use GeoIP database and browser detection module to get city, country, browser and OS from connected user.
You need to install the following Perl modules:
Create an account on https://www.maxmind.com/en/home and put credentials in
# Enter your account ID and license key below. These are available from # https://www.maxmind.com/en/my_license_key. If you are only using free # GeoLite databases, do not uncomment these lines. AccountID 111111 LicenseKey xxxxxx
The database files should present in
In section “General Parameters > Plugins > Location detection”, you can set these parameters.
Enable plugin: Enable/disable this plugin
Path to GeoIP database: Full path to GeoIP2 database
Information requested for IP: Choose
Information requested for User Agent: Choose
When plugin is enabled, new informations will be stored in session:
_location_detect_env_ua: User Agent information
_location_detect_env_ip: GeoIP information
_location_detect_env_display: Both User Agent and GeoIP information
To see them in login history, you can add them to the list of session data to store.
You can also use these information in 2FA rules, access rules, adaptive authentication rules…
For example, to use these information in the new location warning plugin, use