2 Answers
- Newest
- Most votes
- Most comments
0
Hello.
Selecting My IP in the security group settings will set your global IP that you are currently using.
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/working-with-security-groups.html#adding-security-group-rule
Also, if you can run the "curl" command from a console, try the following command.
To check IPv4, add "-4" to the options.
curl ifconfig.io
curl ifconfig.io -4
0
Are the application servers in private subnets where their outbound requests are routed through NAT Gateways? If so, the IP addresses you need is the Elastic IP of the NAT Gateways.
Otherwise, you can obtain the Public IPs of the application servers via the Console, AWS CLI, or EC2 Meta Data Service.
AWS CLI:
aws ec2 describe-instances --query Reservations[*].Instances[*].PublicIpAddress
Meta Data on the server:
TOKEN=`curl -X PUT "http://169.254.169.254/latest/api/token" -H "X-aws-ec2-metadata-token-ttl-seconds: 21600"` \
&& curl -H "X-aws-ec2-metadata-token: $TOKEN" -v http://169.254.169.254/latest/meta-data/public-ipv4
Relevant content
- asked a year ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 5 months ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 3 years ago
Where can I find the MY IP Button ?
Thank you for your reply. When editing a security group rule, you can select it by "Source" as shown in the image below.
sorry this is how I can get MY IP address on my machine, this is not what I am after. i am looking for the IP Address of the elastic beanstalk application server as this is the machine which is attempting to make the SFTP connection to an external source?
I understand. Is the Elastic Beanstalk EC2 instance deployed on a public subnet? For private subnets, is there a NAT Gateway or similar in place?
If EC2 is deployed on a public subnet, you can check the public IP address from the EC2 instance screen. If you are using a NAT Gateway on a private subnet, you can check it from the VPC→NAT Gateway screen.