Qiita Teams that are logged in
You are not logged in to any team

Log in to Qiita Team
Community
OrganizationAdvent CalendarQiitadon (β)
Service
Qiita JobsQiita ZineQiita Blog
17
Help us understand the problem. What is going on with this article?
@sakito

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

More than 5 years have passed since last update.
更新情報
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."
}
17
Help us understand the problem. What is going on with this article?
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
sakito
エンジニア(仮)です。 自己学習のために備忘録の如くメモしていきます。 誤字・脱字、内容不備等ありましたらご指摘いただけますと幸いです。

Comments

No comments
Sign up for free and join this conversation.
Sign Up
If you already have a Qiita account Login
17
Help us understand the problem. What is going on with this article?