如何得到AWS EC2 instance的外网ip

在EC2实例发送请求:http://169.254.169.254/latest/meta-data/public-ipv4

curl http://169.254.169.254/latest/meta-data/local-ipv4

curl http://169.254.169.254/latest/meta-data/public-ipv4

curl http://169.254.169.254/latest/meta-data/public-hostname

具体内容可以见:https://blog.csdn.net/Swallow_he/article/details/105711779

猜你喜欢

转载自blog.csdn.net/Swallow_he/article/details/105687804
今日推荐