I have an EC2 with has public subnet and traffic is flowing through internet gateway.
Now, i have an requirement like I have to block all outgoing traffic in EC2.
I have tried to restrict the traffic at Network ACL'S.
I have allowed ssh port with 22 and rule number as 100.
I have then blocked all traffic with with deny option and rule number 200.
I have done the above change in outbound rules of Network ACL'S that is attached to the VPC.
But after applying this in EC2, I am not able to do ssh also. Login is not happening.
How do i acheive this? I want to block all outgoing traffic but ssh should happen.