Security groups, Network ACL and Firewall

 Security groups, Network ACL and Firewall


Stateful and Stateless firewall - when connection initiated from client firewall checks the rules written and based on the defined rules allows/denies the traffic. Client initiates connection from any port (except the reserved by the OS) but destination port is known and static. So stateful firewall which as name implies keeps the state of connection so that even though there is no outbound rule for the outgoing connection, firewall will automatically allow it. Contrary to this approach in stateless firewall case you should explicitly define rule for inbound and outbound connections.  

Network Access Control List (Network ACL) -  is stateless firewall allows you to define rules in subnet level. Also it processes rules in order.

Security group - on the other hand stateful and also applied to individual instance or instance group. It evaluates all the rules. 

Let's learn how to manage Network ACL's :

  1. Search VPC in the searchbox located in dashboard, click to "Network ACL's" and click onto the VPC we just created in the previous post.





  2. Click to outbound rules and add the following rule. This will block ICMP connection to the any source. And pay attention to the "Rule number" the rule with the lower number processed with the high priority.






  3. Then create an EC2 instance, edit network options and select our VPC with the public subnet.






  4. Send ICMP request basically ping any host you like, even though curl requests works as planned but the ping request doesn't.





    Let's change our rule again this time to allow.






  5. And it works just as we expected.









 

Comments

Popular posts from this blog

Identity Access Management - How to create user in IAM ?!

EC2 - User data

IAM - Roles