Unable to connect to EC2 t2.micro

0

Hi, I am running the free t2.micro instance (clear EC2 instance from https://explore.skillbuilder.aws/learn/course/1851/aws-technical-essentials) and cannot connect to the instance using a Public IPv4 address or Public IPv4 DNS. ping and tracert are listed below. I checked the instance property from the video https://www.youtube.com/watch?v=RVLD0SHtwIc all are good, no restrictions from firewall. I connected to my internet service provider and they said that this is not something that they restricting.

tracert 3.145.10.205

Tracing route to ec2-3-145-10-205.us-east-2.compute.amazonaws.com [3.145.10.205] over a maximum of 30 hops:

1 1 ms 1 ms 1 ms 192.168.0.1 2 2 ms 2 ms 2 ms 192.168.110.1 3 2 ms 2 ms 2 ms 209.152.117.225 4 2 ms 2 ms 2 ms 209.152.117.97 5 3 ms 2 ms 2 ms 100.101.46.1 6 3 ms 2 ms 2 ms 10.255.252.17 7 2 ms 3 ms 2 ms 10.255.254.5 8 3 ms 2 ms 2 ms 10.255.252.34 9 7 ms 7 ms 7 ms 167.142.157.33 10 13 ms 14 ms 10 ms ins-dc2-et-0-0-1-0.desm.netins.net [167.142.67.25] 11 8 ms 7 ms 7 ms ins-dc5-lo0.desm.desm.netins.net [167.142.66.66] 12 7 ms 7 ms 7 ms 167.142.66.65 13 7 ms 7 ms 7 ms be5248.rcr21.dsm01.atlas.cogentco.com [38.104.184.49] 14 15 ms 15 ms 14 ms be2639.ccr41.ord01.atlas.cogentco.com [154.54.29.49] 15 15 ms 15 ms 15 ms be2765.ccr41.ord03.atlas.cogentco.com [154.54.45.18] 16 * * * Request timed out. 17 * * * Request timed out. 18 * * * Request timed out. 19 34 ms 35 ms 34 ms 52.95.1.94 20 38 ms 33 ms 43 ms 52.95.1.103 21 37 ms 40 ms 41 ms 52.95.1.214 22 * * * Request timed out. 23 * * * Request timed out. 24 * * * Request timed out. 25 * * * Request timed out. 26 * * * Request timed out. 27 * * * Request timed out. 28 * * * Request timed out. 29 * * * Request timed out. 30 * * * Request timed out.

Trace complete.

ping 3.145.10.205

Pinging 3.145.10.205 with 32 bytes of data: Request timed out. Request timed out. Request timed out. Request timed out.

Ping statistics for 3.145.10.205: Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),

2 Risposte
0
Risposta accettata

Thank you for helping me figure out the problem. The solution was pretty easy, there was no server running in the background that would be listening to port 443 (or any other). After starting a simple node js server I was able to get a response from the server by his ip.

con risposta un anno fa
0

I would check four things:

  1. Does the Security Group associated with the instance allow ICMP Protocol from your IP address or the internet generally?
  2. Is the EC2 in a public subnet? (meaning the subnet has a routing table with a path to the Internet Gateway), eg. 0.0.0.0/0 igw-121231312
  3. If using an Elastic IP, is it associated to the EC2 instance you are trying to ping?
  4. Check the Network Access Control List (NACL) to see if there are any Deny rules attached to the subnet

This assumes your VPC has an Internet Gateway attached (which would be the case if you used the default VPC).

profile pictureAWS
con risposta un anno fa
profile picture
ESPERTO
verificato un anno fa
ESPERTO
verificato un anno fa
    1. I added a rule for allICMPv4 now ping is reaching, but still cannot connect.
    2. yes, in routes I have as destination 0.0.0.0/0 and attached internet gateway.
    3. I attached Elastic IP to my instance: ping is reaching tracert still has timeouts and still cannot connect.
    4. I didn't configure NACL it has in inbound and outbound rules two rows, a rule * with deny all traffic and rule 100 with allow all traffic (I saw the same rules in video and I can't delete rule *)
  • Have you added an inbound rule in your Security Group for SSH or RDP?

  • I added the shh and rdp in inbound and outbound, but still cannot reach server by address https://3.20.108.133/

  • Oh OK, by "connect" you meant via https - usually people are talking about ssh or rdp. Glad you got it sorted anyway.

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande