VPC Flashcards
What does the CIDR consist of?
Base IP: Represents an IP contained in a range
Subnet Mask: Defines how many bits can change in the IP
What allows us to access our VPC over the internet?
An internet gateway that is attached to our VPC
How do we know if a subnet is public or private?
If it has access to an internet gateway
How many IP addresses are reserved by your subnet for AWS usage?
5, the first 4 and the last one
How many VPCs can be attached to an Internet Gateway
Only one, and vice versa
We have created an IG and attached it to our VPC, but resources cannot connect to the internet, why?
Route tables must be edited to allow public access
What are NAT instances?
An EC2 instance that acts as an intermediary between a private subnet and the public internet. It allows EC2 instances in private subnets to access the internet
What is the difference between a NAT Gateway and an Internet Gateway
An Internet Gateway allows public facing resources to access the internet
A NAT Gateway allows for resources in a private subnet to reach the internet
How many regions can a VPC span?
One
True or False: NAT Gateway spans multiple AZs by default
False. NAT GTW can only be in one zone. You must create multiple gateways in multiple AZs for fault-tolerance. Instances in multiple AZs can use one NAT Gateway
True or False: NAT Gateways allow traffic to the internet but not from the internet
True
What is the purpose of the VPC’s Main Route Table?
It controls routing to/from a subnet or gateway. It is automatically applied for all un-associated subnets
True or False: You cannot associate a subnet with more than one route table?
True
Of NACL vs SG, which one is stateless and which one is stateful?
SG is stateful, NACL is stateless
What does the NACL control access to?
Subnets
How many NACL’s are there per subnet?
One
You have two competing NACL rules, how is it decided which one “wins”?
All rules have numbers, the lower number wins
What is the difference between a NACL and route table?
A NACL is a firewall, meant to accept or block traffic. A route table directs associated traffic to where it needs to go
True or False: The default NACL automatically denies all inbound/outbound traffic?
False. It accepts all traffic
What is the difference between NACL and a Security Group?
SGs operate at the instance level, NACLs operate at the subnet level. NACL’s traffic rules apply to all instances in the subnet they are associated with
What is the significance of the Security Group being stateful?
It will allow outbound traffic if the inbound traffic is accepted, whereas something like the NACL which is stateless, must have an explicit inbound/outbound ruling and must consider ephemeral ports
True or False: If VPC A is peered with VPC B and VPC B is peered with VPC C, than VPC A and VPC C are peered.
False. We must explicitly peer
True or False: We cannot peer two VPCs in different accounts
False
What is the purpose of VPC endpoints?
It allows AWS resources inside a VPC to communicate to AWS resources outside a VPC. It uses a private network instead of a public network
What does VPC Endpoints use to communicate with external AWS resources?
AWS PrivateLink
What are the types of endpoints for VPC Endpoint?
Interface Endpoint: Utilize AWS PrivateLink to link to external resources in AWS network
Gateway Endpoint: Utilizes a subnet route table to route calls through a gateway