I have 2 EC2 Ubuntu instances. They are sharing same VPC, subnet and Security Group. Instances' firewall was turnoff. But I still can't ping each other by private IP. How to allow those instances ping each other?
We can place 2 instances in different network and then install a security rule. And, then assign a different IPs to the 2 EC2 instances. Both are able to talk with the internet.
The security group rule allows ping requests to the EC2 instance from any IP address in the world. If you want to scope down the IP addresses that are allowed to ping your EC2 instance, for Source select My IP . This will only enable you to ping the instance from your current IP address.
AWS security groups block ICMP (including ping, traceroute, etc.) by default. You need to explicitly enable it.
In the security group, add "Custom ICMP" rule for "Echo Request" -- or -- "All ICMP Traffic" -- and as the source IP, instead of an address or block, add the security group's identifier, sg-xxxxxxxx.
Simply being in the same security group doesn't mean the instances can communicate among themselves. It only means they follow the same set of rules... but security group membership is a source attribute as well, on traffic originating from instances that are members of the group.
Hence, the above.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With