Tuesday, April 5, 2016

Nice tool to find info about IPv6 addresses

The site http://ipinfo.io/ offers info about IPv6 addressess:

$ curl ipinfo.io/2001:888:0:18::80
{
  "ip": "2001:888:0:18::80",
  "hostname": "www.xs4all.nl",
  "city": null,
  "country": "NL",
  "loc": "52.5000,5.7500",
  "org": "AS3265 Xs4all Internet BV"
}

If you only want the country:

$ curl ipinfo.io/2001:888:0:18::80/country
NL

To find your own country ;-)

$ python -c "import urllib2; print urllib2.urlopen(urllib2.Request('http://ipinfo.io/country', headers={'User-Agent' : 'curl'})).read() "

NL


Let's try HTTPS:

$ curl https://ipinfo.io/2001:888:0:18::80
SSL access is restricted to paid plans. See http://ipinfo.io/pricing for more details

... ah ... pity.