0

I'm new to using AWS EC2. I'm trying to deploy my web application. I am unable to access the application through public IP. But, http://ec2-XX-XX-XXX-XX.us-west-2.compute.amazonaws.com:4200 is accessible when inside the EC2 region, however XX.XX.XXX.XX:4200 is not accessible. XX.XX.XXX.XX is the public IP.

This is my security group settings:

enter image description here

enter image description here

enter image description here

It seems that it is related to Security groups.

halfer
  • 19,824
  • 17
  • 99
  • 186
Anjana
  • 366
  • 5
  • 21
  • Is your instance in a public subnet? – Chris Williams Jun 19 '20 at 08:16
  • Yes @ChrisWilliams – Anjana Jun 19 '20 at 08:17
  • When you ssh to the instance, does your app work from the inside, when you curl localhost or similar? – Marcin Jun 19 '20 at 08:23
  • Yes, It runs in the port:4200, localhost:4200 – Anjana Jun 19 '20 at 08:25
  • 1
    bind the port process to your private IP, instead of localhost:4200 it should be 172.x.x.x.x:4200 – Edcel Cabrera Vista Jun 19 '20 at 08:51
  • I tried that too, 172.x.x.x.x:4200 is working fine inside the EC2 region...but not accessible outside @EdcelCabreraVista – Anjana Jun 19 '20 at 09:03
  • After you bind the port to the private IP (172.x.x.x.x:4200) you can now invoke the endpoint using the public IP (52.x.x.x.x:4200) or (publicip:4200) when you are accessing it from outside. – Edcel Cabrera Vista Jun 19 '20 at 09:06
  • Yeah...I tried it with public DNS as well as IP, it is not accessible, getting timed out error @EdcelCabreraVista – Anjana Jun 19 '20 at 09:24
  • Based on the error it has something to do with your network or application layer firewall. Have you tried checking if the SG inbound rules that allows 4200 is attached to the right instance where the process is located? – Edcel Cabrera Vista Jun 19 '20 at 09:26
  • Yes, I checked that. I tried turning off the firewall too. While troubleshooting, "Your computer appears to be correctly configured, but the device or resource (52.x.x.x.x.x) is not responding", this is the exact message I'm getting – Anjana Jun 19 '20 at 09:37

0 Answers0