1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

EC2のPublicDNS/PrivateDNSのIPについて

Posted at

NonVPC環境のEC2のPublicDNSとPrivateDNSは以下のようなIPと結びつく

同一リージョン 別リージョン(EC2以外のPC)
PublicDNS PrivateIP PublicIP
PrivateDNS PrivateIP 名前解決不可能

関連:EC2セキュリティグループのSourceにセキュリティグループを指定した場合のアクセス確認 · mechamogera/MyTips Wiki

確認手順

  • Tokyoリージョンに1つ目のEC2を作る
  • Tokyoリージョンに2つ目のEC2を作る(1つ目とは別Zone)
  • PublicDNS:***.ap-southeast-1.compute.amazonaws.com
  • PrivateDNS:***.ap-southeast-1.compute.internal
  • Amazon Linux
  • SingaporeリージョンにEC2を作る
  • PublicDNS:***.ap-northeast-1.compute.amazonaws.com
  • PrivateDNS:***.ap-northeast-1.compute.internal
  • Amazon Linux
  • Tokyoリージョンの1つ目のEC2でPublicDNSのIPを確認する
$ host ***.ap-southeast-1.compute.amazonaws.com
***.ap-southeast-1.compute.amazonaws.com has address [PublicIP]
$ host **.ap-northeast-1.compute.amazonaws.com
***.ap-northeast-1.compute.amazonaws.com [PrivateIP]
  • TokyoリージョンのEC2でPrivateDNSのIPを確認する
$ host ***.ap-southeast-1.compute.internal
Host ***.ap-southeast-1.compute.internal not found: 3(NXDOMAIN)
$ host ***.ap-northeast-1.compute.internal
***.ap-northeast-1.compute.internal has address [PrivateIP]
1
1
0

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
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?