New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IPv6 support #1111
Comments
Please add me to cc on this issue. Regular users don't seem to be able to do it themselves. It's important for me to stay up to date on the ipv6 status of Piwik as my webservers all run dual-stack and disabling IPv6 is not an option. I'd rather disable IPv4 but that's not yet an option. ;) |
Other issues:
Since this adds more runtime dependencies, and incurs performance and storage costs, I'd ideally like to implement this as a plugin. |
The future will be IPv6-only and IPv4 addresses are running out in the next couple of years (some even tell in the next 2 years) so I would think that IPv6 support would/should be a core feature. |
Drupal's reverse proxy configuration has a setting for the IPs of trusted proxies. |
In order to store IPv6 adresses, converting them to long long int (128 bits integer) is perhaps not the best idea. For IPv4 adresses, the difference between decimal and dotted-decimal format doesn't change much, for IPv6, storing a 40 characters string and a 128 bits decimal integer is a HUGEdifference. I'll suggest storing IPv6 adresses as string. Coding a ip2long6 function for PHP is no big deal, but the returned result will be a pain in the ass to treat/calculate/print/store. Also, as ts77 noticed, I really think this should be a core feature : less than 300 days before exhaustion ! |
Attachment: Basic IPv6 integration patch with Live Plugin |
My little contribution ;). Just a little patch in order to add IPv6 support to Live Plugin. This adds a new column in {prefix}_log_visit named location_ipv6 and a few line of code to fill it in the database and read it on the interface. I've just done some very basic testing on it, so use with care. Enjoy ! |
I suggest to raise the importance of that ticket. The german "Deutsche Telekom" has just announced (http://www.heise.de/newsticker/meldung/Deutsche-Telekom-konkretisiert-IPv6-Plaene-1102458.html) that they will migrate all users until the end of 2011 to a dual-stacked IPv4 + IPv6. This also affects all other services like DNS, E-Mail and Hosting. |
nod |
Replying to veretcle:
Sorry, but this is wrong. Please do not store IPv6 addresses as strings! Reasons:
On another note, IPv6 support is critically needed at this point. Please make this bug a priority! |
Everyone: yes, the sky is falling. We understand the need for this feature, and if you're not contributing a patch, we would appreciate your patience in the meantime. The proposal is for:
|
This sounds important, yet not clear how to deal with the new ipv6 notation...
|
I was debugging #1939 and saw an ipv6 display bug in Live! (as expected since we dont support ipv6 yet)
config file has
IP is saved as (int)0 to replicate, in piwik.php add at the top
In this case my IP was indeed a.b.c.d |
(In [3622]) Refs #1111 Dealing with a.b.c.d:12345 IPs |
Can we be compatible with GeoIP lookups on ipv6 addresses? A very quick search brought this thread: http://forum.maxmind.com/viewtopic.php?t=915 which sounds like geoip might be compatible with ipv6 lookups. |
Should be possible. |
Replying to mgc8:
This is effectively an issue : using VARBINARY(16) is much more interesting. So I have done another (simplier) patch that allow IPv6 in visit log. The only issue is that Piwik_Common::getIp() returns an in_addr structure and not a decimal IPv4 address (this will probably lead to an issue if another module uses this function and expect an integer). |
Attachment: |
(In [4533]) fixes #1111 - add support for IPv6 addresses (tracking, anonymization, and exclusion) Notes:
|
(In [4534]) refs #1111 - debug off |
(In [4535]) refs #1111 - fix some of the unit tests; will look at the failing integration tests later |
IPv6 support for the detailed visitor log does not seem to work. Visitors via IPv6 do not show up in the detailed log. Realtime visitor log works, though. |
worksforme. please make sure you're viewing the correct date/period. |
ACK, WFM too, the date was wrongly chosen. |
This is a follow-up ticket to #1110.
To support IPv6 addresses will require data conversion in the database:
In php.net/ip2long, there's an implementation of ip2long6 and long2ip6 that relies on the GNU MP (Multi-Precision) extension ('gmp'). But for greater cross-platform support, we might also consider comparable implementations using the BC Math ('bcmath') extension.
Issues/Considerations:
The text was updated successfully, but these errors were encountered: