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

gefragt vor 2 Jahren2648 Aufrufe
2 Antworten
2
Akzeptierte Antwort

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
EXPERTE
beantwortet vor 2 Jahren
profile pictureAWS
EXPERTE
überprüft vor 2 Jahren
  • 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
EXPERTE
beantwortet vor 2 Jahren

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen