LoginSignup
183
145

More than 5 years have passed since last update.

LinuxでグローバルIPアドレスを確認する方法

Last updated at Posted at 2016-09-11

概要

Linux環境でサーバのグローバルIPアドレスを確認したいとき、curlで以下のURLを入力すると確認することができます。

Curl コマンド

$ curl inet-ip.info
XXX.XXX.XXX.XXX  # グローバルIPアドレス
$ curl http://httpbin.org/ip
{
  "origin": "XXX.XXX.XXX.XXX"  # グローバルIPアドレス
}
$ curl globalip.me
xxx.xxx.xxx.xxx
183
145
1

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
183
145