@d0m84 opened this Issue on September 30th 2020

The current recommendation for users is to use the DB-IP City database, since it offers automatic download and no account creation.

After you did that, the location detection works but the ISP detection doesn't work.
But DB-IP offers an ASN database for this use case as well.

I'm not into the details of .mmdb (or PHP) but it also seems to hold the same keys.

This is the ASN Lite database from Maxmind which works with Matomo

# mmdblookup -f GeoLite2-ASN.mmdb -i 140.82.121.3
  {
    "autonomous_system_number":
      36459 <uint32>
    "autonomous_system_organization":
      "GITHUB" <utf8_string>
  }

This is the free ASN database from DB-IP which doesn't work with Matomo (https://db-ip.com/db/download/ip-to-asn-lite)

# mmdblookup -f GeoLite2-ASN.mmdb -i 140.82.121.3
  {
    "autonomous_system_number":
      36459 <uint32>
    "autonomous_system_organization":
      "GitHub, Inc." <utf8_string>
  }

So for me it looks like the data is there, but the detection just doesn't work with this database. Once this is done the documentation and the updater script could be much easier as well.

@tsteur commented on October 1st 2020 Member

@d0m84 thanks for creating the issue. Do I understand correctly that you are using our Provider plugin and ISP detection doesn't work when using the free ASN DB from DB-IP but it does work with the free ASN DB from MaxMind?

@d0m84 commented on October 1st 2020

@tsteur

Exactly.
I tested it with two different versions of those databases and named them always GeoLite2-ASN.mmdb and placed it in the misc/ folder. With Maxmind Org and ISP detection works, with DB-IP it doesn't.

I'm using the maxminddb PHP extension as suggested.

@sgiehl commented on October 1st 2020 Member

I will have a quick look. Maybe the database has a type Matomo can't handle yet...

@sgiehl commented on October 1st 2020 Member

@d0m84 as expected, their database has a type, that isn't handled by Matomo yet. I'll create a PR to add that in Matomo 4.

@d0m84 commented on October 1st 2020

@sgiehl

Wow that was super fast, thank you very much!

This Issue was closed on October 1st 2020
Powered by GitHub Issue Mirror