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: HTTP::BrowserDetect, GeoIP2.
Create an account on https://www.maxmind.com/en/home and put credentials in /etc/GeoIP.conf:
# 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
Update database:
geoipupdate -v
The database files should present in /var/lib/GeoIP2/.
In section “General Parameters > Plugins > Location detection”, you can set these parameters.
When plugin is enabled, new informations will be stored in session:
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 _location_detect_env for newLocationWarningLocationAttribute and _location_detect_env_display for newLocationWarningLocationDisplayAttribute.