From a776ae4a6bcd5cb83413e814411e364fb8540a4a Mon Sep 17 00:00:00 2001 From: Morgan Date: Sat, 12 Oct 2019 14:24:58 +0200 Subject: [PATCH] determine your instance's IPv4 addresses --- cheat/aws.md | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 cheat/aws.md diff --git a/cheat/aws.md b/cheat/aws.md new file mode 100644 index 0000000..7d7ee7b --- /dev/null +++ b/cheat/aws.md @@ -0,0 +1,6 @@ +### determine your instance's IPv4 addresses + +using instance metadata (source : [AWS Docs](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-instance-addressing.html)) + 1. Connect to your instance. + 2. Use the following command to get its private IP address: `curl http://169.254.169.254/latest/meta-data/local-ipv4` + 3. Use the following command to get its public IP address: `curl http://169.254.169.254/latest/meta-data/public-ipv4`