Line 1: |
Line 1: |
| {{Languages}} | | {{Languages}} |
− | === Maintainer ===
| + | This product includes GeoLite2 data created by MaxMind, available from |
| + | https://www.maxmind.com. |
| + | ==Maintainer== |
| [[User:ReetP|john crisp]] | | [[User:ReetP|john crisp]] |
| | | |
| [mailto:stephdl@de-labrusse.fr stephdl] Stéphane de Labrusse AKA [[User:stephdl|Stephdl]]<br /> | | [mailto:stephdl@de-labrusse.fr stephdl] Stéphane de Labrusse AKA [[User:stephdl|Stephdl]]<br /> |
− | === Version ===
| + | ==Version== |
| {{#smeversion: smeserver-geoip }} | | {{#smeversion: smeserver-geoip }} |
| | | |
Line 18: |
Line 20: |
| See the section below [[GeoIP#Installation_and_Updating_of_geoip_v2_db|Installation of V2 db ]] for steps on how to migrate to the new download mechanism.}} | | See the section below [[GeoIP#Installation_and_Updating_of_geoip_v2_db|Installation of V2 db ]] for steps on how to migrate to the new download mechanism.}} |
| | | |
− | ===Description===
| + | ==Description== |
| | | |
| The GeoIP plugin for qpsmtpd lets you know where your mail server is receiving mail from. If you're receiving too much spam from a particular location, this will help track it down. You can then use that info to reject connections from that place taking the load off your server. | | The GeoIP plugin for qpsmtpd lets you know where your mail server is receiving mail from. If you're receiving too much spam from a particular location, this will help track it down. You can then use that info to reject connections from that place taking the load off your server. |
Line 24: |
Line 26: |
| {{Note box|Maxmind have removed support for their legacy v1 DBs and an update to v2 DBs is required. Please see the bugtracker link to bug #9033 below for more information }} | | {{Note box|Maxmind have removed support for their legacy v1 DBs and an update to v2 DBs is required. Please see the bugtracker link to bug #9033 below for more information }} |
| | | |
− | === Installation of legacy geoip v1 db === | + | ==Installation== |
| + | |
| + | <tabs container><tab name="SME 10"> |
| + | yum install smeserver-geoip --enablerepo=smecontribs |
| + | Then configure your update key, create a Maxmind account and retrieve an AccountID and LicenseKey properties and keys to the geoip db config. |
| + | You can also leave as is and just get the update from rpms every 2 months or so... |
| + | <br /> |
| + | </tab> |
| + | <tab name="SME 9"> |
| + | |
| + | ====Installation of legacy geoip v1 db==== |
| | | |
| those are still available for few time only for back compatibility purpose and to avoid a yum update mess, or if you do not trust third party repo, but be aware thos db are not updated anymore since April 2018 and were already only 80% accurate then. | | those are still available for few time only for back compatibility purpose and to avoid a yum update mess, or if you do not trust third party repo, but be aware thos db are not updated anymore since April 2018 and were already only 80% accurate then. |
Line 31: |
Line 43: |
| signal-event geoip-update | | signal-event geoip-update |
| | | |
− | ==== update of geoip v1 db ==== | + | ====update of geoip v1 db==== |
| if you have smeserver-geoip-1.1.2-7 already installed, this will keep you on the legacy version, only change new plugin comaptible with v1 and removal of cron update. | | if you have smeserver-geoip-1.1.2-7 already installed, this will keep you on the legacy version, only change new plugin comaptible with v1 and removal of cron update. |
| yum update --enablerepo=smecontribs | | yum update --enablerepo=smecontribs |
| | | |
− | ===Installation and Updating of geoip v2 db===
| + | This is not updated anymore since 2018, you do not need the update key if you want to only use this. |
− | | |
− | {{Note box| GeoIP2 will ONLY work on x64 CPU}}
| |
| | | |
− | Sign up for a MaxMind account (no purchase required) https://dev.maxmind.com/geoip/geoip2/geolite2/
| + | ====Installation and Updating of geoip v2 db==== |
− | | |
− | Important - Note your login details and in particular your AccountID and LicenseKey
| |
− | | |
− | Go to Services My Licence key and generate a licence key, carefully note the key details, multiple keys may be created.
| |
− | | |
− | The following config property keys and values will be used to set the geoip config db for ongoing updates see below
| |
− | AccountID #######
| |
− | LicenseKey xxxxxxxxxxxxxxx
| |
− |
| |
− | Because the databases have been updated new perl modules are required to support GeoIP v2. The core modules have a large number of dependencies and we have decided that it is not practical for the Koozali team to maintain them all.
| |
| | | |
| As a result you will now need the OpenFusion repo to install smeserver-geoip We will be syncing their mirror in due course to speed up installs and updates. | | As a result you will now need the OpenFusion repo to install smeserver-geoip We will be syncing their mirror in due course to speed up installs and updates. |
Line 71: |
Line 71: |
| geoip=service | | geoip=service |
| status=enabled | | status=enabled |
− |
| |
− | Now add Maxmind AccountID and LicenseKey properties and keys to the geoip db config
| |
− |
| |
− | db configuration setprop geoip LicenseKey "YOUR LIC KEY" AccountID "YOUR ACCT ID"
| |
| | | |
| ====Fresh Installation of geoip v2 DBs==== | | ====Fresh Installation of geoip v2 DBs==== |
Line 92: |
Line 88: |
| | | |
| Now add Maxmind AccountID and LicenseKey properties and keys to the geoip db config | | Now add Maxmind AccountID and LicenseKey properties and keys to the geoip db config |
| + | </tab> |
| + | </tabs> |
| | | |
− | db configuration setprop geoip LicenseKey "YOUR LIC KEY" AccountID "YOUR ACCT ID"
| + | ==== Maxmind account to update db ==== |
| + | Sign up for a MaxMind account (no purchase required) https://dev.maxmind.com/geoip/geoip2/geolite2/ |
| | | |
− | ==== I installed the beta versions of smeserver-geoip v2 ====
| + | Important - Note your login details and in particular your AccountID and LicenseKey |
− | if you installed smeserver-geoip-1.2-1, smeserver-geoip-1.2-2, smeserver-geoip-1.2-3, then you have already a v2, but you still need to do as you were with legacy version and want to upgrade to v2. Otherwise you will not have the db updated anymore
| |
| | | |
− | db yum_repositories delprop openfusion Exclude
| + | Go to Services My Licence key and generate a licence key, carefully note the key details, multiple keys may be created. |
− | signal-event yum-modify
| |
− | You may then go ahead with the following to either install or update a v2 DB package
| |
− | yum install smeserver-geoip2 --enablerepo=smecontribs,openfusion
| |
− | yum update --enablerepo=smecontribs,openfusion
| |
− | config set UnsavedChanges no
| |
| | | |
− | A configuration db for geoip has been created as part of the install
| + | The following config property keys and values will be used to set the geoip config db for ongoing updates see below |
− | # config show geoip | + | AccountID ####### |
− | geoip=service | + | LicenseKey xxxxxxxxxxxxxxx |
− | status=enabled
| + | set them in db and expand the config file |
− | | + | db configuration setprop geoip LicenseKey "YOUR LIC KEY" AccountID "YOUR ACCT ID" |
− | Now add Maxmind AccountID and LicenseKey properties and keys to the geoip db config
| + | expand-template /etc/GeoIP.conf |
− | | |
− | db configuration setprop geoip LicenseKey "YOUR LIC KEY" AccountID "YOUR ACCT ID" | |
| | | |
− | ==== Update the db ==== | + | ====Update the db==== |
− | (only working for geoip2 from 2019/01/03)
| |
| signal-event geoip-update | | signal-event geoip-update |
| | | |
− | or if you prefer to reboot your server
| + | ==Testing== |
− | signal-event post-upgrade; signal-event reboot
| |
− | | |
− | Updating the geoip database is performed by issuing the following command:
| |
− | signal-event geoip-update
| |
− | | |
− | This contrib adds a template to /etc/crontab to automatically update the database once a month. It's set to do so at midnight on the 5th of each month. If you have a paid subscription through the maintainer of this database (http://dev.maxmind.com/geoip/geoipupdate/) you can update more often. If you do want to update more often, you will have to create a custom template to handle the change. In addition, you will be supplied login credentials that have to be inserted into the file /etc/GeoIP.conf for the update to complete. The file is not templated so it will survive reboots. Use your favorite text editor to insert the information into this file.
| |
− | | |
− | ==== More info on openfusion repo config ====
| |
| | | |
− | The openfusion repo now includes a number of packages as includes and Excludes, this is to prevent inadvertent system updates occurring when updating the old v1 DB package resulting in unstable or inaccessible systems, this is all they are for. These can be seen here:
| + | {{Note box| These tests use the V1 DB which will be increasingly out of date.}} |
− | db yum_repositories show openfusion
| |
− | | |
− | ==Testing==
| |
| | | |
| Now that the package and database are installed, we can test it (refer to Country Code list at end of page as required). | | Now that the package and database are installed, we can test it (refer to Country Code list at end of page as required). |
Line 492: |
Line 471: |
| Users are advised to determine the effectiveness of the database for themselves. | | Users are advised to determine the effectiveness of the database for themselves. |
| | | |
− | === Db compatibility with other softwares === | + | ===Db compatibility with other softwares=== |
| Some software either use or depends on a geoip library, here is a table to help understand: | | Some software either use or depends on a geoip library, here is a table to help understand: |
| {| class="wikitable sortable" | | {| class="wikitable sortable" |
Line 511: |
Line 490: |
| |yes | | |yes |
| |Yes with updates | | |Yes with updates |
− | |Requires updated perl-IO-Socket-INET6 and check_badcountries plugin: https://bugs.contribs.org/show_bug.cgi?id=10523 | + | |Requires updated perl-IO-Socket-INET6 and check_badcountries plugin: https://bugs.contribs.org/show_bug.cgi?id=10523 |
| |- | | |- |
− | |qpsmtpd plugin / smeserver-geoip | + | |qpsmtpd plugin / smeserver-geoip |
| |smecontribs | | |smecontribs |
| |yes | | |yes |
Line 535: |
Line 514: |
| | | | | |
| |yes | | |yes |
− | |https://github.com/maxmind/mod_maxminddb NEED BUILD | + | |https://github.com/maxmind/mod_maxminddb available in smecontribs [[Mod maxminddb|smeserver-mod_maxminddb]] |
| |- | | |- |
| |opensips-mmgeoip | | |opensips-mmgeoip |
Line 632: |
Line 611: |
| | | | | |
| |provided by libmaxminddb-devel (see https://bugzilla.redhat.com/show_bug.cgi?id=1663670) | | |provided by libmaxminddb-devel (see https://bugzilla.redhat.com/show_bug.cgi?id=1663670) |
| + | |- |
| + | |bind-libs /bind-utils |
| + | |smeos |
| + | |required |
| + | |unknown |
| + | | |
| |} | | |} |
| + | you might want to use legacy db updated with recent Maxmind geoilite2, see: https://www.miyuru.lk/geoiplegacy |
| | | |
− | === Bugs === | + | ===Bugs=== |
| Please raise bugs under the SME-Contribs section in [http://bugs.contribs.org/enter_bug.cgi bugzilla] | | Please raise bugs under the SME-Contribs section in [http://bugs.contribs.org/enter_bug.cgi bugzilla] |
| and select the smeserver-geoip component or use {{BugzillaFileBug|product=SME%20Contribs|component=smeserver-geoip|title=this link}}. | | and select the smeserver-geoip component or use {{BugzillaFileBug|product=SME%20Contribs|component=smeserver-geoip|title=this link}}. |
− |
| |
| | | |
| | | |