NACL (Network Access Control List)
NACL and the security group both act as a firewall.
NACL is used on the Subnet level and Security Group on
the instance level.
Ø
NACL allows or
denies (Stateless) specific inbound or outbound traffic at the
subnet level. You can use the default network ACL for your VPC, or you can create
a custom network ACL for your VPC with rules similar to the rules for your
security groups to add an additional layer of security to your VPC.
Ø Each subnet in your VPC must be associated with
a network ACL. You can associate a network ACL with multiple subnets.
However, a subnet can be associated with only one network ACL at a
time. The previous association is removed when you associate a network ACL
with a subnet.
Ø A network ACL has inbound rules and outbound rules.
Each rule can either allow or deny traffic. Each rule has a number from 1 to
32766. evaluate the network ACL rules when traffic enters and
leaves the subnet. Rules are evaluated starting with the lowest
numbered rule.
Ø NACLs are stateless,
which means that information about previously sent or received traffic is not
saved. Security groups are stateful, which means that information about
previously sent or received traffic is saved. In Stateless inbound and
outbound both rules should be defined and in stateful inbound
rule defined and automatically outbound rule defined.
NACL (Network Access Control List) LAB
1.
Create VPC-1
2.
Create
a Subnet for VPC-1
3.
Create
IGW for VPC-1
4.
Attach
IGW with VPC-1
5.
Define
the Route Table for VPC-1 and add the Rule for IGW.
6.
Associate
subnet with VPC-1
7.
Create
Network ACL
8.
Associate
Subnet with Network ACL.
9.
Define
inbound (RDP, All Traffic) and outbound (HTTP/HTTPS) rules on NACL.
10.
Create
EC2 Instance for VPC-1 and enable public IP
11.
Now
we can access the EC2 Instance but it will not respond due to we didn’t define
an outbound rule for response. So, we will allow All Traffic
(1024-65535) in NACL.
12.
Now
again Access EC2 through RDP.it will response.
Comments
Post a Comment