matomo-org / matomo

Empowering People Ethically with the leading open source alternative to Google Analytics that gives you full control over your data. Matomo lets you easily collect data from websites & apps and visualise this data and extract insights. Privacy is built-in. Liberating Web Analytics. Star us on Github? +1. And we love Pull Requests!
https://matomo.org/
GNU General Public License v3.0
19.78k stars 2.63k forks source link

IPv6 Geolocation is not working #8601

Closed sebastianw closed 6 years ago

sebastianw commented 9 years ago

Hello,

it seems Geolocation is not working at the moment for IPv6 addreses. I tried the PHP and PECL backends and none could locate IPv6 addresses. Also I tried to look trough older issues regarding this but I'm confused about the current status. Is this supposed to work?

tsteur commented 9 years ago

I think PECL doesn't support it yet see #6624 but PHP should work. I think it was added in https://github.com/piwik/piwik/pull/6690 What exactly does not work for you? In the other issue (#6690) there's some discussion about IPv6 not detecting the location correctly. Is this what you mean?

sebastianw commented 9 years ago

Yes, I have a lot of IPv6 locations that just show up as unkown. When I look at the source I don't think that the GeoLiteCityv6.dat is even loaded.

mattab commented 9 years ago

Yes, I have a lot of IPv6 locations that just show up as unkown.

Do all IPv6 show as unknown, or only "a lot" of them? if some are being geo located then it's working from the Piwik side, and likely the IPv6 not geo located are because the geo location database is still not precise for ipv6 addresses. Could you send some example IPv6 not geo located and some that are?

sebastianw commented 9 years ago

No, just "a lot" of them. My work IP address shows up unknown, take 2001:780:53d2::1 for example. Some addresses that are successfully geo-located are for Deutsche Telekom addresses.

mattab commented 9 years ago

@sebastianw Could you paste a few examples of IPv6 addresses that don't geo locate?

and a few examples that do geolocate OK?

Thanks!

mattab commented 9 years ago

eg. for 2001:780:53d2::1

sebastianw commented 8 years ago

but is that coming from the ipv6 file or is it somehow using the IPv4 file for that? because I didn't see any attempt to access the ipv6 database

angristan commented 8 years ago

Hello, any news for IPv6 support ?

mattab commented 8 years ago

Hi @Angristan - no news yet, and we likely won't be working on this feature for a while. We would welcome a pull request for this nice feature!

grzchr15 commented 7 years ago

http://www.tcpiputils.com/browse/ipv6-address/2001:9d0:10::1 shows correct IP address 2001:9d0:10::1 Location Austria (AT) flag ASN number 8387 ASN name (ISP) T-Systems Austria GesmbH

http://demo.piwik.org/index.php?module=API&method=UserCountry.getLocationFromIP&ip=2001:9d0:10::1&format=xml Shows incorrect

USNJMiddletown73240.397-74.10807748AT&T WirelessAT&T WirelessamnNordamerikaVereinigte StaatenNew Jersey2001:9d0:10::1
mattab commented 7 years ago

We need help to make this one work. Pull request very welcome

grzchr15 commented 7 years ago

I still struggle how to help implement it. I have a intranet list of ranges and the maxmind dbs. I think in v3.x i need to create a locationprovider. Any more hints where i need to hook , change db schema?, .. docs. And how to debug the new parts and not complete piwik flows

mattab commented 7 years ago

our developer docs are here: http://developer.piwik.org/ There's some work being done in GeoIP2 see: https://plugins.piwik.org/GeoIP2/ #4487

mattab commented 6 years ago

update: we are planning to implement the new Geoip2 support soon, which should also bring support for Ipv6 geo-location.

sgiehl commented 6 years ago

Note: GeoIP2 will fully support IPv6 geolocating. But we won't fix geolocation IPv6 addresses with GeoIP Legacy (PECL)

mattab commented 6 years ago

Fixed in #4487