Discourse uses MAXMIND to provide geographical information for reverse IP lookups.
Without Maxmind’s database you’ll see something like this:
Or perhaps you’ve noticed this message fly by when you rebuild your container:
MaxMind IP database download requires an account ID and a license key
Please set DISCOURSE_MAXMIND_ACCOUNT_ID and DISCOURSE_MAXMIND_LICENSE_KEY. See https://meta.discourse.org/t/configure-maxmind-for-reverse-ip-lookups/173941 for more details.
Why would I care?
It’s often useful for moderators to see where someone is logging in from to determine if the person is who (and where) they say they are or to diagnose problems with your site. (“Oh, we frequently see problems with Special-ISP”.)
Also, as of 2.2.0.beta4, Discourse also uses this information to notify admins if a login is seen from a new location. Without the Maxmind database, Discourse cannot provide this notification.
What if I don’t setup a MaxMind account and generate a license key
You won’t be able to do reverse lookups. If the issues above do not concern you, then it is a good bet that nothing bad will happen if you just ignore this.
How do I setup a MaxMind account and obtain an Account ID and a license key?
generate a license key on the Manage License Keys tab in the left navigation bar once you’ve logged in. Generate a new key, and copy the account ID and the license key. If you lose it, you’ll need to generate a new one.
You then add that key to the ENV section of your app.yml with a line like this:
The Standard install doesn’t fully support IPv6 out of the box. If you have a server with IPv6 configured and need Maxmind information for IPv6 addresses, you’ll need to make sure that the user’s actual IP address is what is getting to Discourse, normally by using an external proxy that passes the remote IP address to Discourse. This requires more systems administration expertise than the standard install.
Was aber lustig ist, ist, dass sich in 3 Jahren niemand sonst beschwert hat! Es ist ein Wiki, also kannst du es beheben. Ich werde versuchen, es zu aktualisieren, wenn ich an einen Computer komme, wenn ich mich daran erinnern kann.
Wirklich!? Und ich habe viel Zeit damit verbracht, sie zu erstellen. Ich bin mir nicht sicher, wie ich übersehen konnte, dass der Link nur für mich funktionierte, aber ich schätze, dass das Einloggen ausreichte, um mich und vielleicht viele andere Leute abzulenken.
Es versteht sich wahrscheinlich für die meisten hier von selbst, aber jemand, der ein VPN verwendet, kann mehr Warnungen generieren als andere. Es ist ein Anstoß für die Administratoren, aber es zeigt nicht unbedingt einen böswilligen Benutzer an.
Entschuldigen Sie,
Wenn Discourse für das Admin-Panel eine IP-Abfrage (Reverse-IP-Lookup) durchführt, greift es dabei auf eine Offline-GeoIP-Datenbank zurück oder fragt es jedes Mal eine externe API ab?
Zum Kontext, meine Präferenz ist es, IP-Lookups offline zu handhaben, indem ich Discourse auf eine lokale GeoLite2-City.mmdb-Datei verweise, anstatt eine externe API aufzurufen.
Nun, ich stecke fest. Ich glaube, ich habe alles richtig eingerichtet, aber ich erhalte einen 401-Fehler bei den MaxMind-DB-Downloads.
Ich verwende eine Standardinstallation, selbst gehostet und aktuell.
Ich habe ein Konto bei MaxMind angelegt und einen neuen Lizenzschlüssel hinzugefügt.
Ich habe den ENV-Abschnitt der app.yml wie folgt bearbeitet:
## Der MaxMind-Geolokalisierungs-IP-Schlüssel für die IP-Adressenabfrage
## siehe https://meta.discourse.org/t/-/137387/23 für Details
DISCOURSE_MAXMIND_ACCOUNT_ID: [meine Account-ID]
DISCOURSE_MAXMIND_LICENSE_KEY: [mein Lizenzschlüssel]
…danach habe ich ./launcher rebuild app ausgeführt.
Beim Neubau wurden diese „401 Unauthorized“-Fehler protokolliert:
(… und natürlich wurden keine DB-Dateien in mein /var/www/discourse/vendor/data kopiert)
Gemäß diesem Vorschlag habe ich einen Befehl verwendet, den ich auf der MaxMind Developer Portal gefunden habe – mit denselben Anmeldeinformationen – um direkt eine Datenbank herunterzuladen: