Question
How to change 'IP to Country Lite database' to MaxMind as a source for blocking countries in Plesk Firewall
Answer
Follow these steps to switch to MaxMind or change its license key.
-
Connect to the server over SSH
-
Edit
/usr/local/psa/admin/conf/panel.ini
# vi /usr/local/psa/admin/conf/panel.ini
-
Add the following lines depending on the version to use and save the file:
-
GeoLite2 DB (free)
[ext-firewall]
geoipDataSource = maxmind-lite -
GeoIP2 DB (paid)
[ext-firewall]
geoipDataSource = maxmind
-
-
Run this command on the terminal once
Note: Replace "<license_key>" with the MaxMind license key.
# LICENSE_KEY="<license_key>" plesk sbin modules/firewall/ipsets --configure --data-source maxmind-lite --force
This may result in warnings like the follwing. They can be ignored as long as their return code is 0:
ipset v7.11: Set cannot be destroyed: it is in use by a kernel component
-
Reapply the configuration using Plesk Firewall
To switch back to DB-IP (db-ip-lite
data source), remove the geoipDataSource
line from panel.ini
and reapply the Plesk Firewall configuration.