Amazon ec2 does not work when accessing through a public IP address

I am new to Amazon EC2. The app works great on Amazon EC2 Windows Server. But when I try to access this via public ip, it is not available. I saw that incoming configurations and ports (HTTP, HTTPS, SSH) are included.

I can not access the application through the public ip.

http:ec2-XX-XX-XXX-XX.us-west-2.compute.amazonaws.com 

available if inside the EC2 area however

 XX.XX.XXX.XX:8080/myapp 

not available.

 XX.XX.XXX.XX is the public ip. 

Yess .. This is VPC .. !!!

+6
source share
5 answers

Create a security group with the request that you want to grant access to. here i created a security group for any request

enter image description here

Then add a specific security group to the network interface.

enter image description here

+3
source

This is more like a security group problem. What exactly did you set in the security group for the instance? In such situations, I start by saying that ping works from the outside, opening an Echo Request for all IP addresses. If the device is not pingable, correct it first. Then limit the IP range.

+2
source

Do the following checks

  • You have connected an Internet gateway to your vpc, and if the subnet in which the device is located belongs to a subnet with an Internet gateway.
  • You are trying with an IP address or FQDN, try ping for google if it works well, if it does not try ping 4.2.2.2.
  • If positive with any result, check DNS records and DNS permissions if you do not change EIP / restart instance
+1
source

There was the same problem. This was found to be a security group issue. A "Custom TCP Rule" was added with port 8080, and it worked fine.

+1
source

I have the same problem. AWS provide DNS DNS IPv6 / IPv6 and DNS IPv4 / IPv4 DNS. in my case, IPv6 DNS is marked as private but accessible from the Internet, and public IPv4-DNS is only available from the intranet.

Since I need to use a name server from another provider, I use IPv6 ip as a point for my domain.

Since u said your dns are available (http: ec2-XX-XX-XXX-XX.us-west-2.compute.amazonaws.com), ping using a command tool to check the exact ip and try to use this ip for viewing.

0
source

Source: https://habr.com/ru/post/977920/


All Articles