0

I have recently spun up an EC2 instance with an elastic IP associate to it.

The EC2 is part of a security group which has port 80(HTTP) and 22(SSH) open. The subnet associated to the EC2 is associated with a route table and internet gateway. The route table has following rules:-

Destination    Target
10.0.0.0/16    local
0.0.0.0/0     igw-0096xxxxxd18debc

When I try to access the EC2 with its elastic IP from browser I get

This site can’t be reached
ip address refused to connect.

When I ssh into the instance and try to run

sudo netstat -antp|grep LISTEN

I get this -

tcp        0      0 127.0.0.53:53           0.0.0.0:*               LISTEN      635/systemd-resolve 
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      845/sshd            
tcp6       0      0 :::22                   :::*                    LISTEN      845/sshd  

What am I doing wrong? How can i reach the EC2 with its elastic ip?

Seeker90
  • 785
  • 4
  • 17
  • 37

1 Answers1

0

according to the netstat, You have ssh service running on port 22 inside the instance.

But you don't have any services running on port 80(e.g web server) therefore You cannot access port 80 on browser (for e.g http://my-ip).

Arun Kamalanathan
  • 8,107
  • 4
  • 23
  • 39