Subnets and Network Access Control Lists

Subnets and Network Access Control Lists

Subnets

A subnet is a section of a VPC in which you can group resources based on security or operational needs. Subnets can be public or private.?

Public subnets contain resources that need to be accessible by the public, such as an online store’s website.

Private subnets contain resources that should be accessible only through your private network, such as a database that contains customers’ personal information and order histories.?

In a VPC, subnets can communicate with each other. For example, you might have an application that involves Amazon EC2 instances in a public subnet communicating with databases that are located in a private subnet.

Network ACLs

A network ACL is a virtual firewall that controls inbound and outbound traffic at the subnet level.

For example, step outside of the coffee shop and imagine that you are in an airport. In the airport, travelers are trying to enter into a different country. You can think of the travelers as packets and the passport control officer as a network ACL. The passport control officer checks travelers’ credentials when they are both entering and exiting out of the country. If a traveler is on an approved list, they are able to get through. However, if they are not on the approved list or are explicitly on a list of banned travelers, they cannot come in.

Each AWS account includes a default network ACL. When configuring your VPC, you can use your account’s default network ACL or create custom network ACLs.?

By default, your account’s default network ACL allows all inbound and outbound traffic, but you can modify it by adding your own rules. For custom network ACLs, all inbound and outbound traffic is denied until you add rules to specify which traffic to allow. Additionally, all network ACLs have an explicit deny rule. This rule ensures that if a packet doesn’t match any of the other rules on the list, the packet is denied.?

Stateless packet filtering

Network ACLs perform stateless packet filtering. They remember nothing and check packets that cross the subnet border each way: inbound and outbound.?


Security groups

A security group is a virtual firewall that controls inbound and outbound traffic for an Amazon EC2 instance.

By default, a security group denies all inbound traffic and allows all outbound traffic. You can add custom rules to configure which traffic should be allowed; any other traffic would then be denied.

For this example, suppose that you are in an apartment building with a door attendant who greets guests in the lobby. You can think of the guests as packets and the door attendant as a security group. As guests arrive, the door attendant checks a list to ensure they can enter the building. However, the door attendant does not check the list again when guests are exiting the building.

If you have multiple Amazon EC2 instances within the same VPC, you can associate them with the same security group or use different security groups for each instance.?

Stateful packet filtering

Security groups perform stateful packet filtering. They remember previous decisions made for incoming packets.

When a packet response for that request returns to the instance, the security group remembers your previous request. The security group allows the response to proceed, regardless of inbound security group rules.



要查看或添加评论,请登录

Bhupendra Maurya的更多文章

  • Amazon ECS (Elastic Container Service)

    Amazon ECS (Elastic Container Service)

    AWS ECS stands for Amazon Elastic Container Service. It is a fully managed container orchestration service provided by…

    1 条评论
  • Nonrelational Databases

    Nonrelational Databases

    Key-value databases Key-value databases logically store data in a single table. Within the table, the values are…

  • ?? Extending Root Volume on an AWS EC2 Instance ??

    ?? Extending Root Volume on an AWS EC2 Instance ??

    Today, I faced a critical situation with my AWS EC2 instance - I ran out of storage space on the root volume! ?? Here's…

  • AWS VPC Setup with Terraform!

    AWS VPC Setup with Terraform!

    ?? I'm excited to share a recent project where I leveraged Terraform to automate the creation of a secure and scalable…

  • Amazon Ec2 Lifecycle

    Amazon Ec2 Lifecycle

    Amazon EC2 (Elastic Compute Cloud) lifecycle refers to the various states and transitions that an EC2 instance…

  • Simplify AWS Infrastructure Deployment with CloudFormation

    Simplify AWS Infrastructure Deployment with CloudFormation

    Are you tired of manually configuring your AWS infrastructure? Say goodbye to tedious setup processes and hello to…

  • Comparing Purchasing Options

    Comparing Purchasing Options

    1. On-Demand Instances With On-Demand Instances, you pay for compute capacity by the hour or by the second depending on…

    1 条评论
  • AWS Networking

    AWS Networking

    #Subnet A subnet, or subnetwork, is a smaller network inside of a larger network. A subnet consists of a smaller…

  • Migrating an E-commerce startup

    Migrating an E-commerce startup

    #Scenario: A growing e-commerce startup is experiencing significant traffic spikes during peak sales seasons. Their…

  • Docker volumes & Bind Mount

    Docker volumes & Bind Mount

    To list all the volumes 2. To create a new volume 3.

    3 条评论

社区洞察

其他会员也浏览了