VPC Flashcards
What is VPC?
Virtual Data Center in the cloud. Lets you provision a logically isolated section of the AWS Cloud where you can launch AWS resources in a virtual network that you define.
True or False. You cannot set your own IP ranges on a VPC.
False, you can.
What is a bastion host?
A special-purpose computer on a network specifically designed and configured to withstand attacks. The computer generally hosts a single application, for example, a proxy server, and all other services are removed or limited to reduce the threat to the computer.
What can you do with VPC?
- Launch instances into a subnet of your choosing
- Configure route tables between subnets
- Create an internet gateway and attach it to your VPC
What is VPC Peerings? List 4 qualities.
- Allows you to connect one VPC with another via a direct network route using private IP addresses
- Instances behave as if they were on the same private network
- Peering is in a star configuration ie 1 VPC peers with 4 others
- You can peer between regions
What is transitive peering and how can you implement it?
The transitive property states that: If a = b and b = c, then a = c. However, you CANNOT perform transitive peering in VPC. You need to set up a new peering relationship for a to peer to c.
True or False. You can have multiple subnets in one availability zone.
True.
True or False. You can have a subnet that spans multiple availability zones.
False, you can only have a subnet span 1 availability zone.
True or False. You can only have one internet gateway linked to a VPC.
True.
True or False. When you create a VPC a default Route Table is the only thing created.
False. You create a Route Table, network Access Control List (NACL) and a default Security Group.
True or False. Creating a VPC won’t create any subnets nor will it create a default internet gateway.
True.
True or False. US-East-1A in your account is the same availability zone to US-East-1A on someone else’s account.
False. The availability zones are randomized.
True or False. Amazon always reserves 2 IP addresses within your subnets.
False. They reserve 5.
True or False. You can have at max 2 gateways per VPC.
False. You can only have 1 internet gateway per VPC.
True or False. Security Groups can’t span VPCs.
True.
What are NAT Gateways?
A group of EC2 instances that allows your private subnet to communicate out to the internet without becoming public.
What are NAT instances?
Individual EC2 instances that allow you to connect to the internet without exposing your private subnet.
Difference between NAT instances and NAT gateway
NAT Instances - single EC2 instance
NAT Gateway - a highly available gateway that allows you to have private subnets communicate out to the internet without becoming public.
True or False. When you create a NAT instance, you must disable source/destination check on the instance.
True.
True or False. NAT instances does not have to be on a public subnet.
False. NAT instances MUST be on a public subnet.
True or False. There must a route out of the private subnet to the NAT instance, in order for the private subnet to have access to the internet.
True. You would configure this in the route tables.
What does the amount of traffic a NAT instance can support depend on? What should you do if you’re bottlenecking?
The size fo the EC2 instance. If you are bottlenecking, increase the instance size.
True or False. NAT Gateways are redundant inside the Availability zone.
True.
True or False. NAT gateways need to be associated with a security group.
False. They are not associated with any security group.
True or False. NAT gateways are automatically assigned to a public IP.
True.
What rules are set up when you create a new Network ACL?
All traffic is denied.
What is an ephemeral port?
short-lived transport protocol port for IP communications
What order do inbound/outbound rules occur in?
Numerical order. If you have a deny, you want to make sure that you do it before an allow, because if the allow the is before the deny, the rule will not work.
True or False. Network ACL act first before Security Groups.
True. If you deny an IP address in Network ACL, it will never even make it to the Security Groups
True or False. Network ACLs are stateless.
True. You need to add inbound and outbound traffic rules separately.
True or False. Just like Security Groups, Network ACLs are stateful.
False. Security Groups are stateful (you inbound rules will be mimicked over to outbound rules) whereas Network ACLs are stateless - you need to explicitly state the rules for both inbound and outbound.
True or False. When provisioning a load balancer you need a minimum of one public subnet.
False. You need at least two public subnets.
What is a VPC flow log?
A feature that enables you to capture information about the IP traffic going to and from network interfaces in your VPC.
What are the three levels at which you can configure a VPC flow log?
- VPC
- Subnet
- Network interface level
True or False. You cannot enable flow logs for VPCs that are peered with your VPC unless the peer VPC is in your account.
True.
Is all traffic monitored on a VPC flow log?
No. The following is not:
- Traffic generated by instances when they contact the Amazon DNS server (not monitored). If you use your own DNS server, then all traffic to that DNS is logged
- Traffic generated by a Windows instance for Amazon Windows license activation is not monitored
- Traffic to and from 169.254.2169.254 for instance metadata
- DHCP traffic
- Traffic to the reserved IP address for the default VPC Router
What is a bastion host?
A special-purpose computer on a network specifically designed and configured to withstand attacks. Generally hosts a single application, for example, a proxy server, and all other services are removed or limited to reduce the threat to the computer.
True or False. A NAT Gateway or NAT Instance is used to provide internet traffic to EC2 instances in a private subnet.
True.
True or False. A Bastion is used to securely administer EC2 instances (using SSH or RDP).
True.
True or False. You can use a NAT Gateway as a Bastion Host.
False. You can NOT use a NAT Gateway as a Bastion Host.
What is direct connect useful for?
- Useful for high throughput workloads (lots of network traffic)
- when a high and reliable connection is needed
How do you configure a VPN over AWS Direct Connect?
- Create a virtual interface in the Direct Connect console. This is a PUBLIC Virtual Interface
- Select Public option
- Select VLAN, not in your current network
- Go to the VPC console and then to VPN connections. Create a Customer Gateway.
- Create a Virtual Private Gateway
- Attach the Virtual Private Gateway to the desired VPC.
- Select VPN connections and create new VPN Connection
- Select the virtual private gateway and the customer gateway
- Once the VPN is available, set up the VPN on the customer gateway or firewall