Public Ip Information

if you are connected to many machines and you need information to the command line you can use from curl this wonderful internet service

many info on their web page

general information

vagrant@vagrant-ubuntu-wily-64:~$ curl http://ipinfo.io/
{
  "ip": "194.6.174.10",
  "hostname": "No Hostname",
  "city": "Cheseaux-sur-Lausanne",
  "region": "Vaud",
  "country": "CH",
  "loc": "46.5825,6.5960",
  "org": "AS3303 Swisscom (Switzerland) Ltd",
  "postal": "1033"
}

specific info

vagrant@vagrant-ubuntu-wily-64:~$ curl http://ipinfo.io/region
Vaud
vagrant@vagrant-ubuntu-wily-64:~$ curl http://ipinfo.io/country
CH
vagrant@vagrant-ubuntu-wily-64:~$ curl http://ipinfo.io/city
Cheseaux-sur-Lausanne

you can also test other ip like is showed in their webpage

vagrant@vagrant-ubuntu-wily-64:~$ host www.gazzetta.it
www.gazzetta.it is an alias for cache.gazzetta.it.
cache.gazzetta.it has address 185.53.36.38
vagrant@vagrant-ubuntu-wily-64:~$  curl http://ipinfo.io/185.53.36.38
{
  "ip": "185.53.36.38",
  "hostname": "No Hostname",
  "city": "",
  "region": "",
  "country": "IT",
  "loc": "43.1479,12.1097",
  "org": "AS202095 RCS MediaGroup S.p.a."
}
Salvo diversa indicazione, il contenuto di questa pagina è sotto licenza Creative Commons Attribution-ShareAlike 3.0 License