Unable to access EC2 Instance over the Public IP Address

0

I was able to access the ec2 instance on Public IP, however I am unable to access the instance now, I have 2 instances running with the similar configurations, I am able to access one of them however the other one is not responding on the Public IP, please suggest what to do.

asked 2 years ago3299 views
2 Answers
1

Did your EC2 machine stop and restart or did it hibernate? In those cases, a new public IP address would have been assigned. If you want the public IP addresses not to change you should get Elastic IPs. Refer to this documentation - https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/using-instance-addressing.html

A public IP address is assigned to your instance from Amazon's pool of public IPv4 addresses, and is not associated with your AWS account. When a public IP address is disassociated from your instance, it is released back into the public IPv4 address pool, and you cannot reuse it.

You cannot manually associate or disassociate a public IP (IPv4) address from your instance. Instead, in certain cases, we release the public IP address from your instance, or assign it a new one:

We release your instance's public IP address when it is stopped, hibernated, or terminated. Your stopped or hibernated instance receives a new public IP address when it is started.

We release your instance's public IP address when you associate an Elastic IP address with it. When you disassociate the Elastic IP address from your instance, it receives a new public IP address.

If the public IP address of your instance in a VPC has been released, it will not receive a new one if there is more than one network interface attached to your instance.

If your instance's public IP address is released while it has a secondary private IP address that is associated with an Elastic IP address, the instance does not receive a new public IP address.

If you require a persistent public IP address that can be associated to and from instances as you require, use an Elastic IP address instead.

If my answer resolved your issue, please upvote and accept my answer. Thanks

profile pictureAWS
EXPERT
answered 2 years ago
0

Hi , there can be multiple reasons.

  1. Check your instance is in public subnet and route table in the subnet has igw there is no block in acl as well as in sg
  2. Sometime some isp having routing issue, check with other isp/mobile internet
  3. Check if any internal firewall /rule/av is blocking or blacklisted your ip.
  4. Check if any external firwall/waf has blacklisted the ip .
sourav
answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions