AWS EC2 instance public ipv4 and DNS address not working

0

Hello, I have created an EC2 instance in which I have attached the default VPC and default security group (In the security group, I have added an inbound rule for all traffic also), but I don't know why public ipv4 and DNS are not opening, it shows the site can't be reached! and when I clicked on Actions-> Monitor and troubleshoot -> Get instance screenshot -: In that, it displays my private IP address, and login (check below image). Can someone guide me to where I am doing wrong?

Enter image description here

asked a year ago2602 views
2 Answers
2
Accepted Answer

Few things to check:

  • The route table that's associated with your instance’s subnet has a default route (0.0.0.0/0) pointing to an IGW (internet gateway)
  • The internet gateway thats associated with the route isn't deleted.
  • The internet gateway is attached to the VPC
  • The security group that's attached to the instance’s elastic network interface has the required rules to allow access
  • The network access control list (network ACL) that is associated with the instance's subnet has rules allowing both outbound and inbound traffic to the internet.

On a side note - Is there a reason you want to use the default VPC? I'd highly encourage to move away from default VPC as it's not recommended and is a bad practice to use mainly for security reasons.

profile pictureAWS
EXPERT
answered a year ago
profile pictureAWS
EXPERT
reviewed a year ago
  • Hello, I have created my own VPC with one subnet and created Internet Gateway and attach VPC to it. After creating, Internet Gateway I created Route table and in that, I have added subnet in subnet association, also add 0.0.0.0/0 with internet gateway in edit routes. In Network ACLs, there are two inbound rules and two outbound rules that is default. After that, I created EC2 instance and selected that VPC and created new security group with HTTP, HTTPS, SSH, RDP all ports are opened. But when I copied Public IPv4 address and opened in browser it display's site can't be reached.

0

Is it possible that you added a private subnet to the default VPC and created the EC2 machine in your private subnet?

profile pictureAWS
EXPERT
answered a year 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