VPC Flashcards
This deck aims to help retain concepts related to the AWS VPC service.
What AWS service creates a logically isolated virtual network similar to a traditional network, but with the scalability of the cloud?
Virtual Private Cloud (VPC)
How do you enable DNS resolution within a VPC?
Use the “Enable DNS resolution” configuration component
How do you provide public DNS names for public instances within a VPC?
Use the “Enable DNS hostnames” configuration option
Which minimum and maximum IPv4 CIDR blocks are allowed when creating a VPC?
Minimum /28, Maximum /16
Which IPv6 CIDR block is assigned when creating a VPC?
/56
What VPC configuration component controls DNS servers, domain names, NTP servers, and the DNS resolution state for devices within a VPC?
Hint: This component cannot be edited, only recreated
DHCP Options Set
How the logical subdivision of a VPC residing within a specific Availability Zone (AZ) and representing a network segment with a range of IP addresses is named?
Subnet
Can subnets within the same VPC communicate with each other?
Yes, by default, services running in different subnets within the same VPC can communicate with each other
How many IP addresses are reserved within a subnet, and why?
Five IP addresses are reserved:
Network address
Network + 1 (for router)
Network + 2 (for DNS)
Network + 3 (for future AWS use)
Network broadcast address
Does VPC support broadcast communication?
No, VPC does not support broadcast communication
How do you automatically assign a public IP address to new instances within a subnet?
Use the Auto-assign public IPv4 address or Auto-assign IPv6 address configuration component for the subnet
What are some important considerations for designing a VPC?
- VPC size
- Network (overlapping CIDR ranges within VPC, Cloud, On-premises, Partners, etc.)
- Structure (tiers, resiliency, and availability)
- Avoid common IP ranges (e.g., 10.0.0.0/16, 10.1.0.0/16)
What component implicitly manages traffic flow within a VPC?
The VPC Router (uses the network + 1 IP address)
What VPC component defines how network traffic from your subnet or gateway is directed?
Route table, each subnet must be associated with a route table containing a set of rules called routes
How many route tables can a VPC subnet be associated with?
One, and only one
How many VPC subnets can be associated with a single route table?
A route table can be shared with multiple subnets
Which route table is used by default for subnets that aren’t associated with a custom one?
The VPC main route table
In a route table, which prefix has higher priority: /16 (VPC) or /32 (single IP)?
In a route table, the more specific prefix (higher number) takes priority, so the answer is /32
Which routes are always present and uneditable in a route table and ALWAYS take priority?
Local routes
What VPC component acts as a bridge between two networks (public internet and VPC), enabling inbound and outbound connections from resources within a VPC?
Internet Gateway (IGW)
How many VPCs can an Internet Gateway be attached to?
One VPC only
What is the resiliency scope of an Internet Gateway?
Internet Gateway is a region-resilient service that runs within the AWS Public Zone
Which type of firewalls do not track the state of connections, where each request and response is treated individually and requires its own rules
Stateless firewalls
Can the IPv4 public address be configured on the EC2 instance OS?
No, the OS is unaware of public addressing, Internet Gateway maintains private IPv4 to public IPv4 mapping
Which type of firewalls track the state of connections by maintaining state tables, where requests and responses are identified as two components of the same connection, so a rule configured to accept incoming traffic will allow outgoing by default?
Stateful firewalls
How could you identify the requester and responder knowing only ports?
- Requests are always made to well-known ports (80, 443, etc.)
- Requester may use an ephemeral port (1024/49152–65535) to initiate requests
Which optional layer of security within a VPC acts as a stateless firewall for controlling traffic in and out of one or more subnets?
Network Access Control List (NACL)
What is the difference between default and custom VPC NACLs?
- Default NACL allows inbound and outbound traffic by default
- Custom NACL implicitly denies inbound and outbound traffic by default
If you configure the VPC NACL Inbound rule to allow HTTP connections on port 80, will the outbound traffic be allowed by default?
No, both rules for inbound and outbound connections should be configured in stateless firewalls, as they are treated separately
How do VPC NACLs process rules?
NACL rules are processed in order, the lowest rule number is processed first, and once a match occurs, processing stops
The rule with the “*” number is an implicit DENY rule, so if no other rule matches, traffic is denied
Describe the content of a VPC NACL rule and the configurations present.
- Rule number
- Protocol/port
- IP/CIDR
Can you use VPC NACLs to restrict traffic from one instance to another within the same subnet?
No, NACLs only impact data crossing subnet boundaries
What is the relationship between subnets and NACLs within a VPC?
- ONE Subnet can be associated with only ONE NACL
- ONE NACL can be associated with MANY Subnets
Which VPC security component could restrict traffic from a certain IP or IP range?
Network Access Control List (NACL)
Which VPC security component represents a virtual stateful firewall for the network interface to control incoming and outgoing traffic?
Security Group (SG)
If you configure the VPC Security Group Inbound rule to allow HTTP connections on port 80, will the outbound traffic be allowed by default?
Yes, in stateful firewalls, inbound and outbound traffic are treated as the same request
Can you explicitly DENY traffic using a VPC Security Group?
No, security groups do not have an explicit DENY rule, so if traffic is not explicitly allowed, then it is implicitly denied
What elements define a VPC Security Group rule in AWS?
- Protocol (e.g., TCP, UDP)
- Port range (e.g., 80, 443)
- Source or destination IP/CIDR block
- Rule direction (inbound or outbound)
What’s the best practice for using NACLs and SGs within a VPC?
- Use Security Groups to explicitly allow traffic and reference logical resources
- Use NACLs to explicit deny traffic to specific IP or network
What are the benefits of referencing logical resources within VPC Security Group rules?
- Reference another security group to allow traffic from certain application tiers
- Reference the current group itself to manage communication between components within the security group