Passer au contenu

Unable to access the EC2 instance with the Public IP

0

I have added the user data script in the EC2 instance. Further, while accessing the linux instance with the Public IP system showing the error as this site cant be reached.

demandé il y a 2 ans364 vues
2 réponses
1

Hi

Here are the troubleshooting steps,

"error as this site cant be reached" Means you are trying to access the Ec2 with Public IP in BROWSER so you need to check the Security groups attached to Ec2, You need to allow inbound rules 80"

Here is the link can help you troubleshoot from SSH level https://repost.aws/knowledge-center/ec2-linux-ssh-troubleshooting Userdata Logs - https://repost.aws/knowledge-center/ec2-linux-log-user-data

EXPERT
répondu il y a 2 ans
EXPERT
vérifié il y a un an
0

Hi,

Here are steps you can try:

  1. Check and add port 80 to the security group: Verify that the security group attached to your EC2 instance has an inbound rule that allows incoming traffic on port 80 (HTTP). If not, add a new inbound rule with the following configuration: Type: HTTP Protocol: TCP Port Range: 80 Source: Anywhere (0.0.0.0/0) or your specific IP address range
  2. Edit Network ACL to allow all traffic inbound: Network ACLs (Access Control Lists) act as a firewall for controlling traffic in and out of subnets. Ensure that the network ACL associated with the subnet where your EC2 instance is launched allows inbound traffic on port 80 (HTTP). You can edit the network ACL rules to allow all inbound traffic by adding a rule with the following configuration: Rule Type: Inbound Protocol: All Port Range: All Source: 0.0.0.0/0 Allow/Deny: Allow
  3. After configuring port 80, if you are trying to access the public IP with HTTPS, that could be another reason, so remember to remove 's' in the browser.
  4. If you are using a public subnet, ensure that an internet gateway is attached to your VPC (Virtual Private Cloud) and that the route table associated with the public subnet has a route to the internet gateway for destination 0.0.0.0/0.

Check out the Troubleshoot connecting to your instance for further insights.

AWS
répondu il y a 2 ans

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.