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
已提問 8 個月前檢視次數 226 次
2 個答案
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
專家
已回答 8 個月前
  • 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
專家
已回答 8 個月前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南