LoginSignup
19
17

More than 5 years have passed since last update.

自分のグローバルIPが知りたい

Last updated at Posted at 2015-01-29
更新情報
2015/03/05 追記 ipinfo.io追加

これで取得できる。

$ curl inet-ip.info
xxx.xxx.xxx.xxx

おまけ


json形式で取得できたりもする。

$ curl http://httpbin.org/ip
{
  "origin": "xxx.xxx.xxx.xxx"
}

付属情報も取れるやつ。

$ curl ipinfo.io
{
  "ip": "xxx.xxx.xxx.xxx",
  "hostname": "No Hostname",
  "city": "Tokyo",
  "region": "Tokyo",
  "country": "JP",
  "loc": "12.3456,789.1011",
  "org": "ABCDEFG HogeFuga, Inc."
}
19
17
3

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
19
17