tags:

views:

414

answers:

2

I'm adding GeoIP tracking to WCF Web Service using MaxMinds' GeoIP Lite Country. All works well for their IPv4 database but they don't give any samples to calculate an IPv6 IP Number. I've contacted them and they said to use a search engine.

Anyone have a sample they're willing to share? Any language will do.

+1  A: 

Its not a duplicate question per se, but from here:

There is no IPv4 to IPv6 mapping that is meaningful. things like 0.0.0.0 and 127.0.0.1 are special cases in the spec, so they have equivalent meaning. But given an IPv4 address it tells you nothing about what its specific IPv6 address would be. You can use a DNS lookup to see if a given IP address resolves to a host which in turn resolves to an IPv6 address in addition to an IPv4 address, but the DNS server would have to be configured to support that for the specific machine.

Kyle Rozendo
> But given an IPv4 address it tells you nothing about what its specific IPv6 address would be.Not entirely true. There are a variety of IPv6 address formats that allow IPv4 addresses to be embedded within them, so there is a surjective mapping from a distinguished subset of IPv6 addresses to IPv4 addresses.In general, what the poster wants is for the geolocator to support IPv6 natively.
james woodyatt
A: 

I wonder have you trying out the IPV6 IP-Country database from IP2Location.com yet?

SuperRomia