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.

Aakash
asked 11 days ago115 views
2 Answers
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

profile picture
EXPERT
GK
answered 11 days ago
profile picture
EXPERT
reviewed 8 days ago
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.

profile pictureAWS
BezuW
answered 10 days 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