0

I'm a new user on AWS and I'm studying with the cloud guru course for the AWS Certified Solutions Architect Associate.

While going trough the course everything worked as it was in the course, but since a few videos I have no SSH access to my EC2 instances on the default VPC.

I just finished the VPC section of the course and I see that both instances has security groups that allows communication via 80 and 22 ports.

I also checked the network access control lists and enabled both inbound and outbound traffic for 22 and 80 ports.

The VPC has an internet Gateway and the EC2 Instances have public IP's.

What am I doing wrong?

I don't remember touching nothing more than the NACL to enable 80 and 22 ports.

Inbound Rules

Inbound Rules

Outbound Rules

Outbound Rules

NACL rules

NACL rules

Route table

Route table

  • Suggest you ask questions like this on the cloud guru forums. Check internet gateway, route table associated with your subnet, NACLs, SGs, and instance. – Tim May 30 '19 at 1:24
  • the route table in that VPC has the route 0.0.0.0/0 with target your internet gateway? something like this: 0.0.0.0/0 -> igw-0c093efc206c13dba – fromthestone May 30 '19 at 11:21
  • @fromthestone Just added some screenshots to clarify – MikeVelazco May 30 '19 at 17:38
1

Your outbound NACL is preventing return traffic to your SSH host. The port rage is the destination port, not source.

The source port for the SSH daemon on your EC2 instance is an ephemeral port number, and the destination port is 22, just the opposite of your computer.

Remove the outbound NACL and everything will be fine.

| improve this answer | |
  • Should I leave the outbound rule as DENY ALL? – MikeVelazco May 30 '19 at 18:45
  • If I do ALLOW ALL TCP the ssh connection is possible – MikeVelazco May 30 '19 at 18:49
  • But if I just remove all the outbound rules and leave only the DENY ALL or just add a rule for SSH, it stops working. – MikeVelazco May 30 '19 at 18:50
  • If you Deny All, then you are denying the traffic from the server to your PC. So nothing works. – Ron Trunk May 30 '19 at 19:37
  • But if I try to allow only Port 22, I also don't have access. – MikeVelazco May 30 '19 at 20:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.