How to ping an EC2 instance A from instance B running in the same VPC, same subnet but different security group in AWS, both are running on the public subnet, I am able to ping to the instance A private IP from B if I add the CIDR blocking range of the VPC but not the public IP and I want to hit the public IP
1 Answers
0
votes
Based on the comments.
The issue was caused by blocking 0.0.0.0/0
on instance B. The solution was to add a rule to the B's security group allowing traffic from its public IP.
In case of internet traffic, rules cannot reference each other by security groups. The SG to SG traffic is only for private IP addresses.
0.0.0.0/0
how would ping over the public IP exactly accessed the instance? – Marcin