A Cantrill - VPC Basics Flashcards
t or f : VPCs by default allow nothing in or out without explicit configuration
True. VPCs by default allow nothing in or out without explicit configuration
What hardware device would an IGW be ?
Router.
What is a Stateless firewall?
A firewall that treats each request as a new connection. It doesnt keep track of state, so each inbound and outbound connection need inbound/outbound defined rules to allow traffic.
What is a Stateful firewall?
A firewall that is “smart” enough to identify the Request and Response of a connection as being RELATED. Does NOT treat them like separate connections (like a Stateless firewall) so only requires an inbound rule.
Allowing the REQUEST (inbound or outbound), means the RESPONSE (in or out) is automatically allowed.
Reduces overhead, doesnt need to allow a full ephemeral port range (49152 to 65535)
true or false: For rules in a NACL, Connections within a subnet that is associated with the NACL are impacted.
ex., two ec2s in the same subnet talking back and forth
False. Connections within a subnet are NOT impacted by NACLs
What type of firewall is a NACL?
A NACL is a STATELESS, network firewall.
Both the request and response parts of EVERY communication need individual rules
(1 x INBOUND rule & 1 x OUTBOUND rule)
What is the default NACL access behavior?
Default NACL allows all access. Has no effect whatsoever
What is the custom (created by user) NACL access behavior ?
Custom NACLs deny all inbound and outbound by default.
What type of a firewall is a Security Group?
Stateful firewall at the subnet level, attached to ENIs. Has NO EXPLICIT DENY.
Allow rules ONLY
How do SGs and NACLs work together?
Use NACLs for EXPLICIT DENY
Use SGs for EXPLICIT allow
What are Security Groups attached to? EC2s or ENIs?
SGs are attached to the ENI of the EC2. SG is NOT directly attached to the EC2 instance
What is best practice for a WEB instance in a PUBLIC SG to interact with an APP instance in a PRIVATE SG?
Create an Inbound rule on the APP SG and set the source as the WEB SG.
Dont have to worry about IPs or CIDR ranges here. Scales really well, reduces admin overhead.
What is the difference between SGs and NACLS?
Use the SG to EXPLICITLY ALLOW
Use the NACL to EXPLICITLY DENY
Difference between NAT gateway and IGW?
NAT GW does IP masquerading - Hiding CIDR blocks behind ONE IP. Many private IPs –> ONE public IP
IGW does a 1-to-1 Private IP to Public IP translation
What type of subnet does an NAT GW need to run from?
NAT GWs need to run from a public subnet.