Reputation: 491
Connection gets timed out when I try to ssh into the ec2 instance and I have isolated the toot cause to the Network ACL associated with the subnet. Below is what I have for inbound and outbound rules. When I change the network ACL to the vpc default which has all ports open for inbound and outbound connection, I can ssh to the box. Whats wrong with this one? I have opened port 22.
Upvotes: 0
Views: 964
Reputation: 679
From AWS documentation:
Network ACLs are stateless; responses to allowed inbound traffic are subject to the rules for outbound traffic (and vice versa).
You need to relax egress ACL to allow outbound connections from ephemeral ports. For example, allow outbound TCP connections for a range of 1024-65535.
For more information, see the Wikipedia article on ephemeral ports.
Upvotes: 2