While playing around with AWS console, I tried the following
- Launched an EC2 instance (public IP enabled) in the default VPC with the default security group, and default subnet.
- EC2 launched in the default subnet with a public IP.
- pinged the EC2 instance from the command prompt using the public IP.
- got request timed out.
- noticed that the default security group inbound rule allows traffic only from the sources within the security group.
- modified the security group inbound rule and allowed traffic from anywhere (0.0.0.0/0)
- pinged the EC2 instance using the public IP again.
- got a response from the server. All good until now.
- ping reply from EC2 host continues to show up in the console.
- I deleted the inbound security group rule. Now there are no inbound rules for the security group.
- on the terminal, reply from EC2 instance continues to show.
My question is - Why I am seeing a reply from the host (EC2 instance) even though the security group's inbound rule has been deleted?
Doesn't the change to the inbound security group rule applies immediately? Why the host (EC2 instance) continues responding without an inbound security group rule?