There are two ways to provide network security to instances running in a VPC, which are as follows:
- Security groups
- NACLs
There are two ways to provide network security to instances running in a VPC, which are as follows:
The first layer of defense for our instances is the security group. A security group always needs to be applied or created when we spawn a new instance in the AWS EC2 service. The security group acts like a personal stateful firewall sitting right in front of the instance and it provides stateful port filtering capabilities. For instance, when we start a Linux web server, we want to do the following: