Public Ip for container

0

My container is up but when I try to access with public IP , am getting output as this site can not be reachable. can anyone suggest why is this output ? when am creating EC2, I have used default VPC, can the above error due to this?

Rekha
asked 8 months ago218 views
2 Answers
0

Hello, Rekha.

If you have launched an EC2 instance in the default Amazon Virtual Private Cloud (VPC) and you are unable to access it via the public IP address, there are several potential reasons for this issue. Here are some troubleshooting steps to help you identify and resolve the problem:

Security Group Configuration: Check the security group associated with your EC2 instance. Ensure that it allows incoming traffic on the necessary ports. Typically, for a web server, you would need to allow inbound traffic on port 80 (HTTP) and/or port 443 (HTTPS) if you're running a web application over HTTPS. Make sure the security group allows traffic from your IP address or has a rule allowing incoming traffic from 0.0.0.0/0 if you want to make it publicly accessible.

Route Table: Confirm that the route table associated with your subnet has a route to the internet via an Internet Gateway (IGW) if you want your EC2 instance to be accessible from the internet. The route destination should be 0.0.0.0/0, and the target should be the IGW.

Instance Status: Ensure that your EC2 instance is in a running state. If it's stopped, you won't be able to access it.

Container exposed to public Please double-check do you expose the container port to the public.

Best regards, Andrii

profile picture
EXPERT
answered 8 months ago
  • I have done all the necessary settings as you mentioned, but no luck. kindly help.

  • How to set route table configurations?

    Destination Target

    0.0.0.0/0 igw-06ae44ae19756b81b 172.31.0.0/16 local (it is private IP)

    pls check the above routes and tell me where am doing mistake

0

Hello.

Are the necessary communications allowed by the inbound rules of the security group set in EC2?
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/working-with-security-groups.html#updating-security-group-rules

Is the container configured with a listen port to allow external access?

profile picture
EXPERT
answered 8 months 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