Amazon ec2 not working when accessing through public IP [closed]
Asked Answered
C

6

54

I am new to Amazon EC2. The application is working fine on the Amazon EC2 Windows Server. But when i am trying to access the same through the public ip, it is not accessible. I have seen the inbound configurations and the ports(HTTP,HTTPS,SSH) are enabled.

I am unable to access the application through public ip.

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

is accessible when inside the EC2 region, however

XX.XX.XXX.XX:8080/myapp 

is not accessible.

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

Yess.. This is VPC..!!!

Curule answered 8/11, 2014 at 15:4 Comment(4)
check firewall settingsAlumina
Late reply. May be helpful for others. In your security group make sure if you are using SSH as inbound rule, change it to Anywhere. That should solve your purpose. [Never use anywhere for Real Apps. Just for learning purpose]Junction
For me, issue was - I had enabled HTTP traffic over port 80 but Chrome was by default opening the public IP on HTTPS. Accessing it on HTTP fixed it for me.Oversweet
Thanks smile your comment helped me solve this problem but previously I was not facing this issue can you please provide anything usefulCallow
C
62

create security group with request you are wish to grant access. here I've created security group to any request

enter image description here

Then add the specific security group to network interface

enter image description here

Campuzano answered 4/7, 2017 at 13:31 Comment(4)
In addition to this enabling port 80 on windows firewall on ec2 instance works for me.Tris
If your inbound rules are correct then, check the windows firewall settings or turn off windows defender. Worked for me. I was also facing this issue for a couple of hours.Booher
Your public IP request goes through HTTP so enable that port from INBOUND. Solution: Open Security groups and edit a new security type with HTTP and Source custom with 0.0.0.0/0 allows any IP request. It's workedDisject
Opening the inbound rules for all traffic is not a good idea, you should restrict doing that.Masters
M
15

This issue is due to subnet assign to ec2 have not internet gateway. For resolve: AWS Console:: VPC:: Create Internet gateway --> Assign to VPC --> Add internet gateway entry into route table that is assigned to ec2 subnet.

Marbles answered 1/5, 2018 at 17:0 Comment(0)
T
14

Had the same issue. Found it to be problem with Security Group. Added a 'Custom TCP Rule' with port 8080, and it worked just fine.

Timbering answered 31/7, 2015 at 17:43 Comment(0)
B
4

It looks more like a security group issue. What exactly did you set in the security group for the instance? In situations like this, I start by making sure ping works from outside by opening Echo Request for all IPs. If the machine is not pingable, fix it first. Then restrict the IP range.

Bond answered 11/11, 2014 at 1:6 Comment(0)
N
1

Do the below checks

  • Have you attached the internet gateway, to your vpc, and if the subnet where the machine resides belongs to the subnet with Internet gateway
  • are you trying with IP address or FQDN, try yo ping to google, if it works well if not try to ping 4.2.2.2
  • If positive with any of the results, check the DNS entries and DNS resolutions if not change the EIP/ restart the instance
Nicotiana answered 9/11, 2014 at 18:29 Comment(1)
Thanks. I had to attach the internet gateway to the VPC, and then set up the route table to target the gateway.Quartern
R
0

i have the same problem. AWS provide IPv6/IPv6 DNS and IPv4/IPv4 DNS.. in my case, IPv6 DNS is tagged private but accessible from internet while the public IPv4 DNS can only be accessible from the intranet.

Since i need to use nameserver from other provider, i use IPv6 ip as point to my domain.

Since u said your dns accessible(http:ec2-XX-XX-XXX-XX.us-west-2.compute.amazonaws.com ), ping using command tool to check the exact ip, and try to use that ip to browse..

Ruzich answered 28/9, 2017 at 19:1 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.