Reputation:
I am unable to publicly ping between two EC2 instances in different subnets only when the security group has entries for ICMP ping that is being sourced from the security group itself as seen below:
Both of my EC2 instances have this security group attached to them. Outbound rules are left at the default which is allow all outbound traffic. If I change the source to '0.0.0.0/0' then I am able to ping between them, however I want to lock this down to only allow this behavior within this particular security group.
Here are images of the applied security group from my two EC2 instances:
I had thought that this policy would allow anything within the security group inbound (since all out is allowed) to receive requests and replies. Any guidance would be appreciated.
Upvotes: 1
Views: 550
Reputation: 238947
Based on the comments the solution was to use private IP addresses instead of the public ones.
Upvotes: 2