Ravindra BagaleCourses & study guides मराठी Track your progress

Chapter 15: Amazon VPC — Subnets, Route Tables, NACL, NAT Gateway and Bastion Host

Come on, friends, now the most important chapter of AWS networking – VPC. Until now we launched every server in the default VPC, and AWS had already built the network for us. Now we build our own network. Picture a housing society: the whole society is the VPC, the wings are subnets, the main gate is the Internet Gateway, the security guard at the wing entrance is the NACL, each flat's lock is the security group, and the direction board near the gate is the route table. At the end we do a real 3-tier project – Nginx, PHP and MySQL in three different subnets. Don't worry, you will get it, slowly slowly you will get it.

What you will learn in this chapter

  • Default VPC vs custom VPC
  • CIDR blocks for VPCs and subnets
  • Public and private subnets
  • Internet gateway and route tables
  • NACL rules and blocking an IP
  • Security group vs NACL
  • Bastion host and NAT gateway
  • A 3-tier Nginx, PHP, MySQL project

This chapter builds on Chapter 1 (IP addresses, CIDR and NAT), Chapter 5 (EC2 and security groups) and Chapter 10 (PHP with MySQL). Keep the AWS console open in the Asia Pacific (Mumbai) ap-south-1 region and do every step yourself.

Concepts in this chapter

  1. 15.1What is a VPC? Default VPC vs custom VPC
  2. 15.2How to create a custom VPC and choose its CIDR block
  3. 15.3Subnets: default and custom subnets, CIDR and limits
  4. 15.4Why do we need subnets? The 3-tier layout
  5. 15.5Internet gateway
  6. 15.6Route tables: public and private subnets
  7. 15.7Network ACL: inbound and outbound rules, rule numbers and blocking an IP
  8. 15.8Security group vs NACL
  9. 15.9Bastion host (jump server) and NAT gateway
  10. 15.10Project: build the 3-tier network and launch the servers
  11. 15.11Project: MySQL, PHP-FPM and Nginx on three tiers
  12. 15.12Project: test every hop, troubleshoot and clean up

Review and practice

  1. ★Common Mistakes I See Students Make
  2. ★Interview Questions
  3. ★Practice Questions and Lab Exercises