Problems with MaxMind and IPv6


(Ethan) #1

Hello,
i have problem with geolocation module in Piwik.
Today i bought MaxMind City database, and general problem with recognizing IPv6.

2a02:8070:48a:4800:65de:de7f:f392:a6aa - recognized by Hong Kong in Piwik
MaxMind CSV:
2a02:8070:48a0::/43,2921044,2921044,0,0,51.5,10.5,100
2921044,en,EU,Europe,DE,Germany,

2a02:810b:c540:3758:b8cc:7e1b:8765:6423 - recognized by Hong Kong in Piwik
MaxMind CSV:
2a02:810b:c540::/48,2894003,2921044,0,0,67659,49.4467,7.7609,100
2894003,en,EU,Europe,DE,Germany,RP,Rheinland-Pfalz,Kaiserslautern,Europe/Berlin

2a02:908:1210:ed60:4d21:26f5:623f:6871 - recognized by Hong Kong in Piwik
MaxMind CSV:
2a02:908:1210::/47,2881085,2921044,0,0,40764,51.1102,6.9604,100
2881085,en,EU,Europe,DE,Germany,NW,“North Rhine-Westphalia”,Langenfeld,Europe/Berlin

2a02:8070:48a:4800:65de:de7f:f392:a6aa - recognized by Hong Kong in Piwik
MaxMind CSV:
2a02:8070:48a0::/43,2921044,2921044,0,0,51.5,10.5,100
2921044,en,EU,Europe,DE,Germany,

GeoIPCity.dat has been moved to \misc directory.
GeoIP (Php) is enabled / installed


#2

I have the same problem, although I’m using the GeoLiteCity.dat.gz, not the paid database.

Country detection for IPV6 is very inaccurate.


(Ethan) #3

As you can see i started to reviewing .csv files from MaxMind paid version manually.
They looks really good, and accurate according to Lite version, anyway there must be some issue in Piwik if even existing IPv6 locations not appear correctly on Visitor List.


(Ethan) #4

For real… is it mean that Piwik dont support IPv6 ?!


#5

Hi, same observation and question for me!

Piwik says ipV6 addresses are from the US while MaxMInd shows them in their right locations (Europe, for instance)…


1and1+WP+Piwik+GeoIP PHP : GĂ©olocalisation fausse
#6

Here’s what I found in the Piwik FAQ regarding IPv6 support:

Geolocating IPv6 does not work very well: most IPv6 will not be accurately geo located. A few Ipv6 addresses may be geo-located when using the PHP or Apache geo location driver. IPv6 geo location does not work with the Maxmind PECL driver (issue). Geo locating Ipv6 addresses may improve in the future as Maxmind (our Geo database provider) improves the accuracy of their IPv6 databases.

For sure, “most IPv6 will not be accurately geo located”!
So true!

Now, when I check an IPv6 address thru GeoIP2 Database Demo | MaxMind I get correct geo-locations… So not sure it’s that Maxmind accuracy I read about in this FAQ… :smiling_imp:


#7

And now, it’s not only IPv6 that are not accurate, many IPv4 are badly located too… while GeoIP2 Database Demo | MaxMind shows their right locations.


(Nicolas Robaux) #8

Hi!
Has someone solve this problem?
Is there a new statement from Piwik team (other than “it’s because of Maxmind”)?
I see more and more IPv6 adresses in my logs, all being faulty said from China or Hong-Kong.


(Hossam Zalapany) #9

this is really weird, how come that CSVs are right, and Binary is wrong?!
I have still same issue !
what GeoIP does PIWIK use for demo site? they seem not having same issue !


#10

Yay, the wait will end in March 2019 as GeoIP2 was finally added as a milestone for V4! :smiley:


(Lukas Winkler) #11

@analytical, you can find more information about the progress of the GeoIP2 migration here:


#12

Wow, so it is actually happening and now coming with V3.4. After years of frustration I was thinking last night about doing it myself…

Very big thank you @SteveG!


(Lukas Winkler) #13

Just FYI: It probably won’t come for 3.4.0, but probably the next release afterwards, because 3.4.0 is going to be released really soon: