내용으로 건너뛰기

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.

질문됨 2년 전366회 조회
2개 답변
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

전문가
답변함 2년 전
전문가
검토됨 2년 전
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
답변함 2년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

관련 콘텐츠